wpf-style Questions

2

Solved

I have a set of buttons in a side panel. I want to change the background of the button that has been clicked. I have tried to do that using style.trigger and the only property I could think of is I...
Weekly asked 20/8, 2014 at 21:23

3

Solved

Consider this (edited-down) Style, designed for a Button whose Content is a String: <Style x:Key="Test" TargetType="Button"> <Setter Property="Template"> <Setter.Value> <Co...
Panettone asked 27/4, 2016 at 17:33

4

Solved

I define my settings and styles in a ResourceDictionary: <ResourceDictionary xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation" xmlns:x="http://schemas.microsoft.com/winfx/2006/...
Tribune asked 27/5, 2011 at 19:17

1

Solved

I can create a button with rounded corners like this (from How to create/make rounded corner buttons in WPF?): <Button> <Button.Resources> <Style TargetType="Border"> <Sett...
Aloha asked 5/2, 2020 at 12:49

1

I have the following TextBox in one of my views: <TextBox Name="SearchTerm" Style="{StaticResource SearchTermTextBoxStyle}" Text="{Binding TemplatesViewModel.SearchTerm, Mode=OneWayToSource, ...
Buckwheat asked 20/1, 2017 at 10:51

1

Solved

I have below button style in window resources: <Style x:Key="MyStyle" TargetType="{x:Type Button}"> <Setter Property="BorderBrush" Value="Transparent"/> <Setter Property="Border...
Longlived asked 4/7, 2017 at 11:49

2

Solved

I have a TextBlock style like this: <Style TargetType="TextBlock" x:Key="FormLabel"> <Setter Property="Height" Value="20" /> <Setter Property="Margin" Value="10" /> <Setter...
Raye asked 30/1, 2017 at 18:17

3

Solved

I have a WPF DataGrid represented in XAML. I'm using a RowStyle for my grid's TableView but also need to set some properties for specific cells. I need those cells to have the properties of the row...
Coss asked 30/11, 2016 at 13:16

1

Solved

I'm received the exception Type reference cannot find type named '{clr-namespace:Dashboard.View}DashBoardColors at runtime. I have a static class with my colors: namespace Dashboard.View { publi...
Veteran asked 29/9, 2016 at 11:20

1

I have a style that fades out a control with animation: <Style x:Key="ExpireFadeStyle"> <Style.Resources> <!--Change this in a derived style if required--> <sys:Double x:Ke...
Tolmann asked 4/8, 2016 at 2:13

1

Solved

In the App.xaml portion of my application I have a ResourceDictionary element that targets things like DataGridColumnHeader and DataGridCell and applies custom styling to them. These definitions ar...
Blatherskite asked 28/5, 2015 at 9:25

1

I have an WPF application contains many TextBoxes having different kind of Bindings which all share the same StringFormat property (its a technical application, the Textboxes should display values ...
Briton asked 4/7, 2014 at 7:39
1

© 2022 - 2024 — McMap. All rights reserved.