Click here to Skip to main content
15,877,618 members
Home / Discussions / WPF
   

WPF

 
AnswerRe: View Refresh Problem Pin
AspDotNetDev21-Feb-12 9:10
protectorAspDotNetDev21-Feb-12 9:10 
GeneralRe: View Refresh Problem Pin
Pete O'Hanlon21-Feb-12 9:17
mvePete O'Hanlon21-Feb-12 9:17 
GeneralRe: View Refresh Problem Pin
AspDotNetDev21-Feb-12 9:26
protectorAspDotNetDev21-Feb-12 9:26 
GeneralRe: View Refresh Problem Pin
Pete O'Hanlon21-Feb-12 9:39
mvePete O'Hanlon21-Feb-12 9:39 
GeneralRe: View Refresh Problem Pin
Kevin Marois22-Feb-12 13:29
professionalKevin Marois22-Feb-12 13:29 
GeneralRe: View Refresh Problem Pin
Pete O'Hanlon22-Feb-12 20:07
mvePete O'Hanlon22-Feb-12 20:07 
GeneralRe: View Refresh Problem Pin
Mycroft Holmes22-Feb-12 13:14
professionalMycroft Holmes22-Feb-12 13:14 
QuestionAccelerator keys on buttons not working Pin
Bernhard Hiller21-Feb-12 1:13
Bernhard Hiller21-Feb-12 1:13 
A short time ago, I started learning WPF (with C#). I learned how to create styles and to embed them.
My style contains
XML
<Style x:Key="RoundedButton" TargetType="{x:Type Button}" BasedOn="{StaticResource {x:Type Button}}">
     <Setter Property="Template">
         <Setter.Value>
             <ControlTemplate TargetType="{x:Type Button}">
                 <Grid>
                     <Rectangle Fill="{TemplateBinding Background}" Stroke="Black" RadiusX="8" RadiusY="8"/>
                     <ContentPresenter HorizontalAlignment="Center" VerticalAlignment="Center"/>
                 </Grid>
             </ControlTemplate>
         </Setter.Value>
     </Setter>
     <Setter Property="Background"  Value="{StaticResource GreenGradientBrush}"/>
     <Style.Triggers>
         <Trigger Property="Button.IsFocused" Value="true">
             <Setter Property = "Background"   Value="{StaticResource RedGradientBrush}"/>
         </Trigger>
         <Trigger Property="Button.IsMouseOver" Value="true">
             <Setter Property = "Background"   Value="{StaticResource GoldGradientBrush}"/>
         </Trigger>
     </Style.Triggers>
 </Style>

 <Style x:Key="AcceptButton" TargetType="{x:Type Button}" BasedOn="{StaticResource RoundedButton}">
     <Setter Property="Background"  Value="{StaticResource BlueGradientBrush}"/>
     <Setter Property="Content" Value="_OK" />
     <Setter Property="IsDefault" Value="true" />
 </Style>


When I add the AcceptButton to a Window, the underline of "_OK" shows up, and clicking ALT+O does not have any effect.
How can I get the accelerator key working?
AnswerRe: Accelerator keys on buttons not working Pin
Pete O'Hanlon21-Feb-12 1:32
mvePete O'Hanlon21-Feb-12 1:32 
GeneralRe: Accelerator keys on buttons not working Pin
Bernhard Hiller21-Feb-12 2:38
Bernhard Hiller21-Feb-12 2:38 
GeneralRe: Accelerator keys on buttons not working Pin
Pete O'Hanlon21-Feb-12 2:43
mvePete O'Hanlon21-Feb-12 2:43 
QuestionData binding to a UserControl Pin
John T.Emmatty19-Feb-12 6:05
John T.Emmatty19-Feb-12 6:05 
AnswerRe: Data binding to a UserControl Pin
Pete O'Hanlon21-Feb-12 2:53
mvePete O'Hanlon21-Feb-12 2:53 
Question901130 - Image is not displayed Pin
ilostmyid218-Feb-12 21:59
professionalilostmyid218-Feb-12 21:59 
AnswerRe: 901130 - Image is not displayed Pin
ilostmyid220-Feb-12 21:42
professionalilostmyid220-Feb-12 21:42 
AnswerRe: 901130 - Image is not displayed Pin
Pete O'Hanlon21-Feb-12 2:49
mvePete O'Hanlon21-Feb-12 2:49 
QuestionResource Dictionary Question Pin
Kevin Marois17-Feb-12 14:40
professionalKevin Marois17-Feb-12 14:40 
QuestionBest Design Approach For This App Pin
Kevin Marois15-Feb-12 14:46
professionalKevin Marois15-Feb-12 14:46 
AnswerRe: Best Design Approach For This App Pin
SledgeHammer0116-Feb-12 7:32
SledgeHammer0116-Feb-12 7:32 
GeneralRe: Best Design Approach For This App Pin
Kevin Marois16-Feb-12 7:43
professionalKevin Marois16-Feb-12 7:43 
QuestionSet Combo SelectedItem In DataTemplate Pin
Kevin Marois15-Feb-12 5:30
professionalKevin Marois15-Feb-12 5:30 
AnswerRe: Set Combo SelectedItem In DataTemplate Pin
SledgeHammer0115-Feb-12 8:05
SledgeHammer0115-Feb-12 8:05 
GeneralRe: Set Combo SelectedItem In DataTemplate Pin
Kevin Marois15-Feb-12 15:48
professionalKevin Marois15-Feb-12 15:48 
GeneralRe: Set Combo SelectedItem In DataTemplate Pin
SledgeHammer0116-Feb-12 7:25
SledgeHammer0116-Feb-12 7:25 
QuestionTrying to use the VisualStateManager Pin
Super Lloyd15-Feb-12 2:04
Super Lloyd15-Feb-12 2:04 

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.