Click here to Skip to main content
15,883,901 members
Home / Discussions / WPF
   

WPF

 
GeneralRe: deployment size with WPF on .NET Core Pin
Super Lloyd5-Jun-19 14:26
Super Lloyd5-Jun-19 14:26 
AnswerRe: deployment size with WPF on .NET Core Pin
Eddy Vluggen6-Jun-19 0:10
professionalEddy Vluggen6-Jun-19 0:10 
GeneralRe: deployment size with WPF on .NET Core Pin
Super Lloyd6-Jun-19 0:52
Super Lloyd6-Jun-19 0:52 
AnswerWPF ListBoxView Problem Pin
Alisaunder23-May-19 2:17
Alisaunder23-May-19 2:17 
AnswerRe: WPF ListBoxView Problem Pin
Gerry Schmitz23-May-19 3:31
mveGerry Schmitz23-May-19 3:31 
AnswerRe: WPF ListBoxView Problem Pin
Alisaunder23-May-19 7:19
Alisaunder23-May-19 7:19 
GeneralRe: WPF ListBoxView Problem Pin
Gerry Schmitz23-May-19 7:44
mveGerry Schmitz23-May-19 7:44 
QuestionWPF Geometry Question Pin
Kevin Marois9-May-19 9:56
professionalKevin Marois9-May-19 9:56 
I have the following XAML that creates a Gear icon in a button. It works well with one problem... because the icon is made up of 2 Geometrys, the mouseover 'flickers' when the mouse pointer is in between them.
    <Window.Resources>
        <SolidColorBrush x:Key="normalColor">#0026FF</SolidColorBrush>
        <SolidColorBrush x:Key="hoverColor">#E62DFF</SolidColorBrush>
        <SolidColorBrush x:Key="pressedColor">#7F7818</SolidColorBrush>
        <SolidColorBrush x:Key="disabledColor">#808080</SolidColorBrush>
        <Geometry x:Key="settingsIconOutter">
            M911 2215 c-34 -39 -36 -45 -54 -153 l-12 -73 -70 -30 -70 -29 -40
            29 c-106 76 -117 81 -167 81 -67 0 -89 -14 -195 -122 -127 -130 -134 -176 -43
            -305 28 -39 50 -74 50 -78 0 -4 -12 -38 -26 -75 l-27 -68 -51 -7 c-106 -14
            -146 -26 -176 -57 l-30 -30 0 -177 0 -177 28 -26 c40 -38 59 -45 151 -59 58
            -9 85 -17 88 -28 3 -9 16 -40 30 -70 l24 -55 -29 -40 c-77 -107 -82 -118 -82
            -168 0 -67 14 -89 122 -195 131 -128 177 -134 309 -40 l74 53 65 -27 c72 -30
            72 -30 91 -149 10 -63 17 -80 44 -107 l33 -33 177 0 178 0 32 35 c27 28 35 47
            45 107 18 117 18 116 92 148 l67 28 77 -54 c70 -49 83 -54 131 -54 30 0 64 5
            76 11 32 16 186 169 203 201 8 15 14 51 14 81 0 48 -5 61 -54 131 l-54 77 28
            67 c32 74 31 74 150 93 63 10 80 17 107 44 l33 33 0 177 0 177 -33 33 c-26 26
            -45 34 -102 44 -116 19 -126 22 -132 39 -3 10 -16 40 -28 69 l-23 51 49 69
            c96 133 90 184 -40 316 -47 49 -98 95 -113 103 -15 8 -51 14 -80 14 -49 0 -61
            -5 -132 -55 l-78 -54 -37 18 c-20 10 -52 24 -72 30 -34 11 -37 15 -43 64 -15
            107 -27 147 -58 177 l-30 30 -178 0 -178 0 -31 -35z m309 -111 c0 -34 35 -204
            46 -221 8 -13 40 -30 81 -43 37 -13 94 -36 125 -51 32 -16 68 -29 81 -29 13 0
            61 27 107 60 46 33 86 60 89 60 4 0 36 -29 71 -65 49 -50 62 -69 55 -80 -93
            -135 -115 -170 -115 -186 0 -11 13 -45 29 -77 15 -31 38 -87 50 -124 12 -36
            27 -71 34 -76 7 -6 53 -17 102 -26 50 -9 100 -19 113 -21 21 -5 22 -10 22
            -100 0 -109 16 -94 -134 -120 -48 -8 -94 -19 -102 -25 -7 -7 -20 -35 -30 -63
            -9 -29 -32 -84 -50 -124 -19 -40 -34 -81 -34 -92 0 -10 28 -60 62 -111 l62
            -91 -67 -66 -66 -67 -90 62 c-49 34 -99 62 -110 62 -12 0 -47 -13 -79 -29 -31
            -15 -87 -38 -124 -50 -36 -12 -71 -28 -76 -34 -6 -7 -18 -53 -27 -102 -8 -50
            -18 -100 -21 -112 -4 -22 -9 -23 -99 -23 -109 0 -94 -16 -120 134 -8 48 -19
            94 -25 102 -7 7 -35 21 -63 30 -29 9 -81 30 -116 45 -93 42 -113 39 -213 -30
            l-85 -60 -67 68 -68 68 61 85 c70 97 75 125 37 191 -13 23 -37 77 -52 120 -15
            43 -34 82 -43 86 -9 5 -64 17 -124 26 l-107 18 0 97 0 97 109 18 c124 20 139
            30 160 105 7 25 28 78 48 118 24 52 32 82 28 100 -3 15 -33 63 -65 107 l-59
            80 69 69 68 69 69 -50 c116 -84 136 -89 206 -49 23 13 77 37 120 52 43 15 82
            34 86 43 5 9 17 64 27 124 l18 107 98 0 c54 0 98 -3 98 -6z
        </Geometry>
        <Geometry x:Key="settingsIconInner">
            M970 1601 c-154 -49 -279 -176 -324 -330 -25 -84 -21 -230 7 -311 73
            -206 247 -330 462 -330 153 1 245 34 345 126 71 66 111 128 140 214 29 87 25
            256 -9 339 -58 144 -177 253 -320 295 -75 22 -229 20 -301 -3z m293 -164 c71
            -32 141 -102 175 -175 38 -81 38 -193 0 -274 -34 -73 -103 -142 -176 -176 -81
            -38 -193 -38 -274 0 -73 34 -142 103 -176 176 -36 76 -38 192 -5 265 85 184
            282 264 456 184z
        </Geometry>
        <Style TargetType="{x:Type Button}"
               x:Key="settingsButton">
            <Setter Property="Height" Value="120"/>
            <Setter Property="Width" Value="120"/>
            <Setter Property="Template">
                <Setter.Value>
                    <ControlTemplate>
                        <Viewbox>
                            <Grid>
                                <Path x:Name="outerPath" Data="{StaticResource settingsIconOutter}" Fill="{StaticResource normalColor}" />
                                <Path x:Name="innerPath" Data="{StaticResource settingsIconInner}" Fill="{StaticResource normalColor}" />
                            </Grid>
                        </Viewbox>
                        <ControlTemplate.Triggers>
                            <Trigger Property="Button.IsMouseOver" Value="true">
                                <Setter TargetName="outerPath" Property="Fill" Value="{StaticResource hoverColor}" />
                                <Setter TargetName="innerPath" Property="Fill" Value="{StaticResource hoverColor}" />
                            </Trigger>
                            <Trigger Property="Button.IsPressed" Value="true">
                                <Setter TargetName="outerPath" Property="Fill" Value="{StaticResource pressedColor}" />
                                <Setter TargetName="innerPath" Property="Fill" Value="{StaticResource pressedColor}" />
                            </Trigger>
                            <Trigger Property="Button.IsEnabled" Value="false">
                                <Setter TargetName="outerPath" Property="Fill" Value="{StaticResource disabledColor}" />
                                <Setter TargetName="innerPath" Property="Fill" Value="{StaticResource disabledColor}" />
                            </Trigger>
                        </ControlTemplate.Triggers>
                    </ControlTemplate>
                </Setter.Value>
            </Setter>
        </Style>
    </Window.Resources>
    <StackPanel Orientation="Horizontal"
                HorizontalAlignment="Center">

<pre>
    <Button Style="{StaticResource settingsButton}"/>

    <Button Style="{StaticResource settingsButton}"
            IsEnabled="False"
            Margin="20,0,0,0"/>



Paste this into a Window and you'll see what I mean.
If it's not broken, fix it until it is.
Everything makes sense in someone's mind.
Ya can't fix stupid.


modified 9-May-19 16:02pm.

AnswerRe: WPF Geometry Question Pin
Richard Deeming9-May-19 10:14
mveRichard Deeming9-May-19 10:14 
GeneralRe: WPF Geometry Question Pin
Kevin Marois9-May-19 10:25
professionalKevin Marois9-May-19 10:25 
QuestionDataGrid Binding Problem Pin
Kevin Marois29-Apr-19 17:37
professionalKevin Marois29-Apr-19 17:37 
AnswerRe: DataGrid Binding Problem Pin
Gerry Schmitz29-Apr-19 18:22
mveGerry Schmitz29-Apr-19 18:22 
GeneralRe: DataGrid Binding Problem Pin
Kevin Marois30-Apr-19 4:34
professionalKevin Marois30-Apr-19 4:34 
GeneralRe: DataGrid Binding Problem Pin
Gerry Schmitz30-Apr-19 5:43
mveGerry Schmitz30-Apr-19 5:43 
GeneralRe: DataGrid Binding Problem Pin
Kevin Marois30-Apr-19 6:47
professionalKevin Marois30-Apr-19 6:47 
GeneralRe: DataGrid Binding Problem Pin
Gerry Schmitz30-Apr-19 21:46
mveGerry Schmitz30-Apr-19 21:46 
AnswerRe: DataGrid Binding Problem Pin
Mycroft Holmes29-Apr-19 21:19
professionalMycroft Holmes29-Apr-19 21:19 
GeneralRe: DataGrid Binding Problem Pin
Kevin Marois30-Apr-19 4:35
professionalKevin Marois30-Apr-19 4:35 
GeneralRe: DataGrid Binding Problem Pin
Mycroft Holmes30-Apr-19 12:25
professionalMycroft Holmes30-Apr-19 12:25 
AnswerRe: DataGrid Binding Problem Pin
Richard Deeming1-May-19 8:32
mveRichard Deeming1-May-19 8:32 
QuestionBinding "SelectedItems" of a Listbox Pin
Jayme6524-Mar-19 1:15
Jayme6524-Mar-19 1:15 
AnswerRe: Binding "SelectedItems" of a Listbox Pin
Gerry Schmitz24-Mar-19 6:15
mveGerry Schmitz24-Mar-19 6:15 
QuestionMicrosoft Documentation Pin
RichardChiles8-Mar-19 12:41
RichardChiles8-Mar-19 12:41 
AnswerRe: Microsoft Documentation Pin
Richard Deeming8-Mar-19 13:35
mveRichard Deeming8-Mar-19 13:35 
GeneralRe: Microsoft Documentation Pin
RichardChiles8-Mar-19 13:46
RichardChiles8-Mar-19 13:46 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.