Click here to Skip to main content
15,922,894 members
Home / Discussions / WPF
   

WPF

 
QuestionMultibinding Validation Pin
Jammer9-Mar-09 5:27
Jammer9-Mar-09 5:27 
AnswerRe: Multibinding Validation Pin
ABitSmart9-Mar-09 7:34
ABitSmart9-Mar-09 7:34 
GeneralRe: Multibinding Validation Pin
Jammer9-Mar-09 23:14
Jammer9-Mar-09 23:14 
QuestionHow to make the forground of the selected item in the ListView? Pin
inkfish9-Mar-09 4:28
inkfish9-Mar-09 4:28 
AnswerRe: How to make the forground of the selected item in the ListView? Pin
Ray Cassick9-Mar-09 5:42
Ray Cassick9-Mar-09 5:42 
GeneralRe: How to make the forground of the selected item in the ListView? Pin
inkfish9-Mar-09 15:10
inkfish9-Mar-09 15:10 
QuestionCan i change button color on mouse over in the xaml ? Pin
Yanshof9-Mar-09 0:30
Yanshof9-Mar-09 0:30 
AnswerRe: Can i change button color on mouse over in the xaml ? Pin
ABitSmart9-Mar-09 0:48
ABitSmart9-Mar-09 0:48 
QuestionThe format string which put into textbox Pin
Archy_Yu9-Mar-09 0:26
Archy_Yu9-Mar-09 0:26 
AnswerRe: The format string which put into textbox Pin
Mark Salsbery9-Mar-09 6:06
Mark Salsbery9-Mar-09 6:06 
AnswerRe: The format string which put into textbox Pin
johnsontroye12-Mar-09 13:52
johnsontroye12-Mar-09 13:52 
Generalsilverlight vs2005 [modified] Pin
Ramkumar_S9-Mar-09 0:15
Ramkumar_S9-Mar-09 0:15 
GeneralRe: silverlight vs2005 Pin
Mark Salsbery9-Mar-09 6:04
Mark Salsbery9-Mar-09 6:04 
Question1DateEdit control in WPF application Pin
jaylinuxguru8-Mar-09 18:53
jaylinuxguru8-Mar-09 18:53 
AnswerRe: 1DateEdit control in WPF application Pin
ABitSmart8-Mar-09 19:34
ABitSmart8-Mar-09 19:34 
AnswerRe: 1DateEdit control in WPF application Pin
Pete O'Hanlon8-Mar-09 22:22
mvePete O'Hanlon8-Mar-09 22:22 
QuestionIsEnabled binding in contextmenu does not work. Pin
Pauwels Bart7-Mar-09 21:25
Pauwels Bart7-Mar-09 21:25 
Hi,

I have a contextmenu defined and binded the IsEnabled property for some items. This is (part of) the code:


<Window x:Class="PAP.PhotoAnnotation"
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
xmlns:controls="clr-namespace:PAP.Controls"
WindowState="Maximized"
Title="{Binding Path=Title, ElementName=canvasContainer, Mode=OneWay}">

<Window.Resources>
<!-- Converts tooltype to bool for checking controls -->
<controls:ConverterActiveElement x:Key="convActiveElement"/>
</Window.Resources>

<Grid>
<DockPanel>
<ScrollViewer Name="container" VerticalScrollBarVisibility="Auto" HorizontalScrollBarVisibility="Auto">
<controls:CanvasContainer x:Name="canvasContainer" Background="LightGray">
<controls:CanvasContainer.ContextMenu>
<ContextMenu x:Name="contexMenu">
<MenuItem Header="Undo"/>
<MenuItem Header="Redo"/>
<Separator/>
<MenuItem Header="Cut"/>
<MenuItem Header="Copy"/>
<MenuItem Header="Paste"/>
<MenuItem Header="Delete"/>
<Separator/>
<MenuItem Header="Select All"/>
<Separator/>
<MenuItem Header="Bring Forward"
Click="BringForward_Click"
IsEnabled="{Binding Path=ActiveElement, ElementName=canvasContainer,
Mode=OneWay, Converter={StaticResource convActiveElement}}"/>
<MenuItem Header="Send Backward"
Click="SendBackward_Click"
IsEnabled="{Binding Path=ActiveElement, ElementName=canvasContainer,
Mode=OneWay, Converter={StaticResource convActiveElement}}"/>
<Separator/>
<MenuItem Header="Properties"/>
</ContextMenu>
</controls:CanvasContainer.ContextMenu>
<!-- Add children in code to populate canvas -->
</controls:CanvasContainer>
</ScrollViewer>
</DockPanel>
</Grid>
</Window>



The problem is that this does not work. It just allways stays enabled. I also binded some buttons in a toolbar and menu-items in a normal menu EXACTLY the same and that works perfect Confused | :confused: !

Anyone an idea of what is wrong?

Thx!
AnswerRe: IsEnabled binding in contextmenu does not work. Pin
ABitSmart8-Mar-09 0:23
ABitSmart8-Mar-09 0:23 
QuestionBinding To A Collection Within A Collection Pin
BlitzPackage6-Mar-09 14:04
BlitzPackage6-Mar-09 14:04 
AnswerRe: Binding To A Collection Within A Collection Pin
ABitSmart6-Mar-09 18:02
ABitSmart6-Mar-09 18:02 
QuestionWPF vs. Pentaho Pin
puromtec16-Mar-09 10:13
puromtec16-Mar-09 10:13 
AnswerRe: WPF vs. Pentaho Pin
Pete O'Hanlon6-Mar-09 11:30
mvePete O'Hanlon6-Mar-09 11:30 
GeneralRe: WPF vs. Pentaho Pin
puromtec17-Mar-09 5:37
puromtec17-Mar-09 5:37 
Questionwpf and images Pin
MarvColon6-Mar-09 3:45
MarvColon6-Mar-09 3:45 
AnswerRe: wpf and images Pin
ABitSmart6-Mar-09 5:10
ABitSmart6-Mar-09 5:10 

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.