Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 9175723
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 17, 20262026-06-17T16:57:53+00:00 2026-06-17T16:57:53+00:00

I´m a beginner in WPF and XAML Programming. And my English isn’t very good.

  • 0

I´m a beginner in WPF and XAML Programming. And my English isn’t very good. Sorry for that!

Here is my Problem. I want a custom Check-box. It should only be enabled when the Mouse is over and the Cursor should change to the Help-Cursor.

That works fine! When i click in the Check-box, the Check-box changes to .ischeckd = true and shows the litte arrow in the check-box. When i click again in the check-box the .ischecked property changes to false an the little arrow in the Check-box is gone. So far so good!
But when I set the .ischeckd Value Programaticaly it doesn’t changes the little arrow in the Check-box. So the User of the Program thinks the Check-box is “active” even though the .ischecked property is false. Hope you understand my Problem…
Here is the XAML Code:

</Style>
    <Storyboard x:Key="StoryboardCheckBox"/>
    <Style x:Key="CheckBoxStyle1" TargetType="{x:Type CheckBox}">
        <Setter Property="Template">
            <Setter.Value>
                <ControlTemplate TargetType="{x:Type CheckBox}">
                    <Grid Margin="0,0,42,0">
                        <VisualStateManager.VisualStateGroups>
                            <VisualStateGroup x:Name="CommonStates">
                                <VisualState x:Name="Normal"/>
                                <VisualState x:Name="MouseOver">
                                    <Storyboard>
                                        <BooleanAnimationUsingKeyFrames Storyboard.TargetProperty="(UIElement.IsEnabled)" Storyboard.TargetName="checkBox">
                                            <DiscreteBooleanKeyFrame KeyTime="0" Value="True"/>
                                        </BooleanAnimationUsingKeyFrames>
                                    </Storyboard>
                                </VisualState>
                                <VisualState x:Name="Pressed"/>
                                <VisualState x:Name="Disabled"/>
                            </VisualStateGroup>
                        </VisualStateManager.VisualStateGroups>
                        <CheckBox x:Name="checkBox" Content="Gutschrift" FontSize="13.333" IsEnabled="False" Cursor="Help" Margin="0,0,4.937,0"/>
                        <ContentPresenter HorizontalAlignment="{TemplateBinding HorizontalContentAlignment}" RecognizesAccessKey="True" SnapsToDevicePixels="{TemplateBinding SnapsToDevicePixels}" VerticalAlignment="{TemplateBinding VerticalContentAlignment}" Content="" Margin="78.063,9.723,0,0"/>
                    </Grid>
                </ControlTemplate>
            </Setter.Value>
        </Setter>
    </Style>

…
some lables and buttons and other stuff

<CheckBox Content="CheckBox" HorizontalAlignment="Left" Height="23" Margin="29,0,0,44" Grid.Row="1" Style="{DynamicResource CheckBoxStyle1}" VerticalAlignment="Bottom" Width="125" Name="CheckBoxGutschrift" IsChecked="False" DataContext="{Binding}" Checked="CheckBoxGutschrift_Checked" Unchecked="CheckBoxGutschrift_Unchecked" ClickMode="Press" IsTabStop="False" />

Hope you understand my Problem! Thanks a lot for the answers, Ruediger

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-17T16:57:54+00:00Added an answer on June 17, 2026 at 4:57 pm

    You forgot to bind internal checkbox’s IsChecked property in the control template:

    <CheckBox x:Name="checkBox" IsChecked="{TemplateBinding IsChecked}" ...
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

beginner to python here. I have 2 nested lists that I want to merge:
Beginner's question here: If I'm writing an If statement that I want to pertain
I am beginner on WPF and need your help. Problem: I have 4 buttons
I'm a complete beginner in WPF and have an app that uses StoryBoard to
I'm beginner in programming in C# and WPF and I'm creating a file manager
I am a beginner when it comes to programming but I was sure that
Okay here is a softball beginner WPF question. By default the background of the
I'm a beginner with this and trying to understand how WPF and XAML work.
I'm a beginner learning WPF, and need to create an Application Bar that launches
I am new to WPF, Xaml, and am a C# beginner! I have been

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.