Click here to Skip to main content
12,076,925 members (47,054 online)

Silverlight / WPF

 
GeneralRe: WPF TabItem Styling Question Pin
Kevin Marois30-Dec-12 16:16
memberKevin Marois30-Dec-12 16:16 
QuestionList Item Fore & Back Colors Pin
Kevin Marois29-Dec-12 8:52
memberKevin Marois29-Dec-12 8:52 
QuestionMVVM:How to bind the MenuItem Command of ListBoxItem ContextMenu dynamically? Pin
Member 137073829-Dec-12 2:58
memberMember 137073829-Dec-12 2:58 
AnswerRe: MVVM:How to bind the MenuItem Command of ListBoxItem ContextMenu dynamically? Pin
SledgeHammer0129-Dec-12 8:22
memberSledgeHammer0129-Dec-12 8:22 
GeneralRe: MVVM:How to bind the MenuItem Command of ListBoxItem ContextMenu dynamically? Pin
Member 137073829-Dec-12 16:44
memberMember 137073829-Dec-12 16:44 
GeneralRe: MVVM:How to bind the MenuItem Command of ListBoxItem ContextMenu dynamically? Pin
SledgeHammer0129-Dec-12 17:26
memberSledgeHammer0129-Dec-12 17:26 
GeneralRe: MVVM:How to bind the MenuItem Command of ListBoxItem ContextMenu dynamically? Pin
Member 137073829-Dec-12 18:00
memberMember 137073829-Dec-12 18:00 
GeneralRe: MVVM:How to bind the MenuItem Command of ListBoxItem ContextMenu dynamically? Pin
SledgeHammer0129-Dec-12 18:25
memberSledgeHammer0129-Dec-12 18:25 
GeneralRe: MVVM:How to bind the MenuItem Command of ListBoxItem ContextMenu dynamically? Pin
Member 137073829-Dec-12 20:02
memberMember 137073829-Dec-12 20:02 
Questionmm Pin
Aishwarya aishu28-Dec-12 1:44
memberAishwarya aishu28-Dec-12 1:44 
AnswerRe: mm Pin
Richard MacCutchan28-Dec-12 6:59
mvpRichard MacCutchan28-Dec-12 6:59 
Generalsiverlight Pin
Aishwarya aishu28-Dec-12 1:42
memberAishwarya aishu28-Dec-12 1:42 
GeneralRe: siverlight Pin
Richard MacCutchan28-Dec-12 6:57
mvpRichard MacCutchan28-Dec-12 6:57 
QuestionDataTrigger bind to a Property Pin
mbv80023-Dec-12 18:01
membermbv80023-Dec-12 18:01 
I am trying to change the appearance of a control when the value of a property changes. I am using the XAML and C# code below, but nothing happens when I click on the button that changes the value of the Property myProperty, except when I first run the application. Any suggestions?


<Window x:Class="WpfApplication3.MainWindow"
        
        xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
        xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
        Title="MainWindow" Height="350" Width="525">
    
<Grid>
<Button Height="34" HorizontalAlignment="Left" x:Name="toggleBroadcast" VerticalAlignment="Top" Width="133" Margin="180,0,0,0">
<Button.Style>
  <Style x:Name="bb" TargetType="{x:Type Button}">
   <Setter Property="Content" Value="Original Content"/>
    <Style.Triggers>
      <DataTrigger Binding="{Binding Path=myProperty}" Value="true">
        <Setter Property="Content" Value="IS TRUE"/>
      </DataTrigger>
      <DataTrigger Binding="{Binding Path=myProperty}" Value="false">
          <Setter Property="Content" Value="IS FALSE"/>
      </DataTrigger>
     </Style.Triggers>
                    
                </Style>
            </Button.Style>
         </Button>
        <Button Content="Click on This Button" HorizontalAlignment="Left" Width="158" Click="Button_Click_1" Height="34" VerticalAlignment="Top"/>
   </Grid>
</Window>


using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using System.Windows;
using System.Windows.Controls;
using System.Windows.Data;
using System.Windows.Documents;
using System.Windows.Input;
using System.Windows.Media;
using System.Windows.Media.Imaging;
using System.Windows.Navigation;
using System.Windows.Shapes;
 
namespace WpfApplication3
{
    public partial class MainWindow : Window
    {
        Boolean _Check = false;
        public MainWindow()
        {
            DataContext = this;
            InitializeComponent();
        }
        public Boolean check
        {
            get
            {
                return _Check;
            }
        }
 
        private void Button_Click_1(object sender, RoutedEventArgs e)
        {
            _Check = !_Check;
        }
    }
}

AnswerRe: DataTrigger bind to a Property Pin
Pete O'Hanlon23-Dec-12 20:17
protectorPete O'Hanlon23-Dec-12 20:17 
AnswerRe: DataTrigger bind to a Property Pin
Wayne Gaylard23-Dec-12 20:39
mentorWayne Gaylard23-Dec-12 20:39 
QuestionWPF Adorner Issues Pin
John Simmons / outlaw programmer17-Dec-12 11:52
mvpJohn Simmons / outlaw programmer17-Dec-12 11:52 
AnswerRe: WPF Adorner Issues Pin
SledgeHammer0118-Dec-12 5:49
memberSledgeHammer0118-Dec-12 5:49 
GeneralRe: WPF Adorner Issues Pin
John Simmons / outlaw programmer20-Dec-12 10:09
mvpJohn Simmons / outlaw programmer20-Dec-12 10:09 
GeneralRe: WPF Adorner Issues Pin
SledgeHammer0121-Dec-12 5:50
memberSledgeHammer0121-Dec-12 5:50 
QuestionSilverlight Dynamic indexed binding Pin
Member 934221816-Dec-12 19:02
memberMember 934221816-Dec-12 19:02 
QuestionThird Party Controls Pin
Kevin Marois11-Dec-12 8:22
memberKevin Marois11-Dec-12 8:22 
AnswerRe: Third Party Controls Pin
Mycroft Holmes11-Dec-12 13:06
memberMycroft Holmes11-Dec-12 13:06 
AnswerRe: Third Party Controls Pin
Pete O'Hanlon11-Dec-12 13:43
protectorPete O'Hanlon11-Dec-12 13:43 
GeneralRe: Third Party Controls Pin
Kevin Marois12-Dec-12 9:28
memberKevin Marois12-Dec-12 9:28 
GeneralRe: Third Party Controls Pin
Pete O'Hanlon12-Dec-12 9:29
protectorPete O'Hanlon12-Dec-12 9:29 
GeneralRe: Third Party Controls Pin
Kevin Marois12-Dec-12 9:30
memberKevin Marois12-Dec-12 9:30 
GeneralRe: Third Party Controls Pin
Mycroft Holmes12-Dec-12 13:02
memberMycroft Holmes12-Dec-12 13:02 
QuestionHow can I Bind a DataTemplate Slider definition to the Code behind? Pin
maycockt10-Dec-12 6:24
membermaycockt10-Dec-12 6:24 
AnswerRe: How can I Bind a DataTemplate Slider definition to the Code behind? Pin
Alisaunder10-Dec-12 14:52
memberAlisaunder10-Dec-12 14:52 
GeneralRe: How can I Bind a DataTemplate Slider definition to the Code behind? Pin
maycockt14-Dec-12 2:18
membermaycockt14-Dec-12 2:18 
QuestionHow does one define IOleServiceProvider in a C# WPF application? Pin
Xarzu10-Dec-12 4:54
memberXarzu10-Dec-12 4:54 
AnswerRe: How does one define IOleServiceProvider in a C# WPF application? Pin
Pete O'Hanlon10-Dec-12 5:08
protectorPete O'Hanlon10-Dec-12 5:08 
QuestionSetting icons based on Region/city name?! Pin
radkrish9-Dec-12 20:43
memberradkrish9-Dec-12 20:43 
AnswerRe: Setting icons based on Region/city name?! Pin
Abhinav S9-Dec-12 21:12
mvpAbhinav S9-Dec-12 21:12 
QuestionWPF ComboBox Selected Item Problem Pin
Kevin Marois8-Dec-12 11:48
memberKevin Marois8-Dec-12 11:48 
AnswerRe: WPF ComboBox Selected Item Problem Pin
Ninja__Turtle8-Dec-12 18:43
memberNinja__Turtle8-Dec-12 18:43 
AnswerRe: WPF ComboBox Selected Item Problem Pin
Wayne Gaylard8-Dec-12 19:24
mentorWayne Gaylard8-Dec-12 19:24 
GeneralRe: WPF ComboBox Selected Item Problem Pin
Kevin Marois8-Dec-12 20:37
memberKevin Marois8-Dec-12 20:37 
GeneralRe: WPF ComboBox Selected Item Problem Pin
Kevin Marois8-Dec-12 20:37
memberKevin Marois8-Dec-12 20:37 
GeneralRe: WPF ComboBox Selected Item Problem Pin
Wayne Gaylard8-Dec-12 20:39
mentorWayne Gaylard8-Dec-12 20:39 
QuestionAt commands Pin
Pranay Dabholkar7-Dec-12 6:56
memberPranay Dabholkar7-Dec-12 6:56 
AnswerRe: At commands Pin
Abhinav S9-Dec-12 21:14
mvpAbhinav S9-Dec-12 21:14 
QuestionCurrency Converter Pin
pjank427-Dec-12 6:44
memberpjank427-Dec-12 6:44 
AnswerRe: Currency Converter Pin
Pete O'Hanlon7-Dec-12 7:58
protectorPete O'Hanlon7-Dec-12 7:58 
GeneralRe: Currency Converter Pin
pjank427-Dec-12 8:38
memberpjank427-Dec-12 8:38 
QuestionWPF Binding TextBox to Dependency Property Pin
g_ap5-Dec-12 2:02
memberg_ap5-Dec-12 2:02 
AnswerRe: WPF Binding TextBox to Dependency Property Pin
Richard Deeming5-Dec-12 3:53
memberRichard Deeming5-Dec-12 3:53 
Questionhighlight list view - is--moueOver Pin
dominioYP3-Dec-12 11:07
memberdominioYP3-Dec-12 11:07 
AnswerRe: highlight list view - is--moueOver Pin
SledgeHammer013-Dec-12 12:52
memberSledgeHammer013-Dec-12 12:52 

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.


Advertise | Privacy | Mobile
Web03 | 2.8.160212.1 | Last Updated 9 Feb 2016
Copyright © CodeProject, 1999-2016
All Rights Reserved. Terms of Service
Layout: fixed | fluid