I am trying to create a button with two images on it. One at left side and one at right side and text in center. After searching I got a button with image only so I wanted to know if it is posible to create a button as I described above in xamarin?
I am trying to create button like this and also I want to change arrow image on the button click to up arrow and down arrow. Is it posible in xamarin to create button like this or should I think about another option any idea?
You can't directly do this with the Button from Xamarin Forms as it doesn't support images yet.
From your requirement what you can do is create a horizontal stacklayout and add the images and a label to it. Also set a background color so that it would look like a button.
To make it work like a button, add a Gesture recognizer to the stack layout and add the tap gesture.
You can handle the event for tapping or bind it via command if you are using MVVM.
Related
How can I make a TitleBar like Groove Music? It has an auto back button with the app name. Additionally, it's NavigationViewPane is extended to the TitleBar.
So I first added:
Windows.ApplicationModel.Core.CoreApplication.GetCurrentView().TitleBar.ExtendViewIntoTitleBar = true;
and then make the back button of NavigationView visible. However, there is a known issue with that. Basically, part of that back button is covered by something which makes it only clickable somewhere. Although a solution is provided here, it doesn't seem to have a good compatibility with the AppViewBackButton (for example I only want the AppViewBackButton to be blue) and I couldn't make it work.
Then I tried using SystemNavigationManager.GetForCurrentView().AppViewBackButton but that button doesn't seem to be same as the Groove Music, because that one aligns well with the buttons in the NavigationView. I could redesign the NavigationViewStyle to make them fit but that requires a lot of work (how do I get the size of AppBackButton or how to customize it?). And the OpenPane of the NavigationView has a shadow but I didn't find it in the original style.
Is there a better way to do it?
UWP Groove Music Title Bar
UWP Groove Music app's back button contains two types, one is NavigateView's BackButton, other is AppViewBackButton.
for example I only want the AppViewBackButton to be blue
You could check the back button of Now Playing page, it is AppViewBackButtonthat the background color follow the system setting. You could custom it by switching other color in the Windows colors setting.
Update
The problem is the button is click able control, if you call SetTitleBar method set the button as title bar, the button will disable.
Please add the following
CoreApplication.GetCurrentView().TitleBar.ExtendViewIntoTitleBar = true;
And remove Window.Current.SetTitleBar(EmptyTitleBar); in NowPlayingFullPage method.
Just turn my comment under NicoZhu's post into an answer.
To create a title bar like Groove music, you need to customize it. And modify your code based on the code here at the bottom.
Additionally, if you need to switch pages, you would better add this to the Page_Loaded event of pages that you will be switching so that your title bars are draggable:
Window.Current.SetTitleBar(AppTitleBar);
I am new with kinect V2, windows 10. I have couple of wpf buttons at the bottom on a wpf page and i want to drag each button one by one to the central area of the canvas and drop it. This should trigger the event for that button and it should navigate to a new page. How do i implement that. I have already written a code to perform simple drag and drop of those buttons. I want to know how to specify the central area (Which would look like a rectangle )in my C# code where i could drop these buttons, which would trigger the respective button event.
I have a function private void OnManipulationCompleted in my DragDropElementController.cs .How do I specify in this different page navigation for 3 different buttons to be dragged and dropped in a different xaml page
Help me with this!
I need to create custom button. This will be circle with rings, each ring is separate button. Button text will be displayed on rings. Bellow you can find image how button will looks.
http://imageshack.us/photo/my-images/90/ringbutton.png
I would like to know if it is possible to create this kind of button using VS and WPF.
Do I need third party libraries?
Any examples of similar buttons?
As I written before I had put different size circle buttons one over another and is working like dream. But still I can't display some text on created "rings".
I had use path to display text on rings but is complicated (for me) and text cover button so I can't click where text is.
Any ideas?
You could just put the image on your form and implement a Click() event. It's really not that different from a "real" button.
You know when you add a button in winForms, and then debug, on mouse over the button light`s up. I guess that a hover effect. I want to do the same thing to a pictureBox. How can i do it?
One thing i want this is becouse i added a picture box and imported a .png image of a button. And i am trying to make my own personalized buttons. Is there any smarter/other way to make a button?
You can hook into the MouseHover event on the Control object to do this.
http://msdn.microsoft.com/en-us/library/system.windows.forms.control.mousehover.aspx
Is there any built-in control like a dropdown/slider? For instance, I want to display some info on dialog/control/form and inside that form there is a arrow which expands it to show more information?
alt text http://img227.imageshack.us/img227/4945/73068794.jpg
When I click the black arrow, the form should expand vertically to show more info. That's what I want to achieve. If there isn't any built-in control, can you please tell me what do I need to do to implement it myself? And how can I add a little animation when it is expanding?
Like here (when you click the menu header it doesn't expand/contract instantly rather it does little slowly, that's the kind of animation I would like to add)
This CodeProject article should help you get started.