I would like to try build my first WP8.1 app and I have a problem with CommandBar in Hub. I want to add different bar to all HubSections but I don't know how to do this :/ I tried to use SectionsInView (like here) but the change of CommandBar items is sooooo slow.
The second question is how can I make transparent CommandBar in HubSection? HubSection contains ListView. Now, when I try to do this, ListView bottom margin is changing and I don't see ListView under CommandBar (I don't know why...). Look at picture.
The third question is how can I change AppBarButton color when I'm pressing it?
Answer 1. You can try to create a new AppBar programmatically in the xaml.cs.
Answer 2. You can change the transparency for your AppBar. You'll also have to do this programmatically. Choose the control that you want the AppBars transparency to change with, select which event you wan't the AppBars transparency to change with. (Make sure you have given you AppBar a name).
Then type this in the following line:
BottomBar.Background = new SolidColorBrush(Color.FromArgb(50, 24, 68, 120));
Make sure you change the value for the option A, from 0-100. This option will decide what transperency you will have. The other options like R, G % B will decide what color the AppBar will have.
Answer 3. It's not really possible, the buttons highlight relies on your devices Accent Color. Therefore it takes a lot of programming to change that one little action.
Related
I would like to know how to set the color of the main window in a WINUI 3 C# application. By default, it matches whatever theme color is applied to the Windows computer. In this example, it is a purple color. Can I set/override this color with a specific color of my own?
I don't think it's possible "for the moment".
I tried overriding the ThemeResources but it only applied to the controls inside the app not its window border. But there is a discussion on GitHub to make the app window borderless, so there's a chance that they make it possible to change the border color.
https://github.com/microsoft/microsoft-ui-xaml/issues/1247
I'm new to Blend and XAML, and I've got a UserControl containing just a white rounded off rectangle and a label with black text. However, when the UserControl is clicked, I want the rectangle to change to Blue and the label text to White, to emulate a sort of selected look. What is the best way to do this? I'm not familiar with XAML so I was hoping there'd be a solution where I can just set two templates for it in Blend, and then in that UserControl code window, have a click event handler where I just tell it to switch over to the other template. Thanks
The easiest - and designer friendliest - way to achieve this is to define two visual states. When the user clicks the control you can use the GotoStateAction to switch between the states.
Using visual states allows you to define everything visually without having to delve into code or XAML.
Hope it helps.
I'm wondering how to create blinking or glowing "Alarm!" button/image.. For image -> one normal jpg, and one gif? Any easier solutions?
You might this useful - http://www.codeproject.com/KB/buttons/VistaButton.aspx
Easy way is to create two image files , one with the glow, another without it . When the app receives the alarm change the button image .
The buttons in Windows Vista and Windows 7 already glow and throb by default when the user mouses over them, and/or when one is set as the default button for a form. The effect looks like this:
If you're not getting this effect already, make sure that the FlatStyleproperty of your button control is set to "System".
I have made a TabControl and want to use some controls (labels, textboxes, buttons and combobox drop-downs). The problem is that when I select a tab, the default background color is not the same as the default background color of the form the controls used to be on. The color of the tab and the controls are too similar and it doesn't look good.
I have looked, but people seem to say that it's impossible to color tabs. What is a good solution to this? Should I put some kind of frame, label or something else inside the tab to make the background darker?
It's easy to get your tab pages to use the same background color as your form:
Make sure that the TabPage you want to change is visible in the designer. Click on it to select it.
In the Properties Window, find the UseVisualStyleBackColor property, and set it to False.
And as a bonus, once you've set this property to False, you can specify any background color that you want for the TabPage using its BackColor property.
The reason that this works is that you're forcing the tab page not to render with visual styles (i.e., themes as defined by Windows). The default theme actually paints tab pages a slightly lighter shade of the color used to paint other 3D elements (like forms and buttons). The problem (under the Aero theme in particular) is that the color of the standard 3D elements is so light already that the tab pages almost look white!
If you're satisfied with the contrast of the controls against the standard background color of your form, I suggest that you simply set the UseVisualStyleBackColor property to False and leave it at that without specifying a custom background color. Respecting the user's default theme is generally the best practice, rather than trying to skin an application yourself.
EDIT: Note that this will not change the color of the tabs themselves at the top of the TabControl. To do that, you're going to have to specify it as owner-drawn and handle its DrawItem event, forcing you to do all of the painting yourself. In most cases, however, this is not necessary.
Hiya,
I'm a bit of a newbie to .NET so please ignore my ignorance. If you look at the above image (a complete prototype, ignore black bits :)) you will see lovely menus, toolbars & statusbars all using windows XP render mode and in a funky blue.
Look at the form, labels, checkboxes and other buttons and you see horrible old school windows grey. These components don't have a render mode.
My question: is there any way to show everything in XP style or do I have to chose new components?
Thx.
A.
It looks like XP style. The button has rounded corners with smooth 3D look (not just "raised box" as the "old school gray" was like).
Here is example of old style grey buttons:
(source: techmynd.com)
It seems like there are no way of getting the toolbar background as background on the checkbox and button. An alternative is to add them as toolbar buttons instead, using DisplayStyle=Text.
The check box can be replaced with a toolbar button and setting CheckOnClick=True. It also has a property Checked that can be true or false. If you need tri-state, you can use the property CheckState instead.
This is already standard XP style.
Try changing the render mode of the Toolstrip; that may make you happier.
Otherwise, you'll need to move to a third-party component vendor.
I've been using DevExpress, and I'm very happy with them.