Click here to Skip to main content
15,905,419 members
Home / Discussions / WPF
   

WPF

 
GeneralRe: Visual State Manager - What's Wrong? Pin
#realJSOP1-Aug-10 1:34
professional#realJSOP1-Aug-10 1:34 
AnswerRe: Visual State Manager - What's Wrong? Pin
Abhinav S1-Aug-10 4:01
Abhinav S1-Aug-10 4:01 
QuestionFilling out extent of margins. Pin
dbrenth29-Jul-10 9:16
dbrenth29-Jul-10 9:16 
AnswerRe: Filling out extent of margins. Pin
dbrenth29-Jul-10 9:18
dbrenth29-Jul-10 9:18 
GeneralRe: Filling out extent of margins. Pin
BRShroyer29-Jul-10 9:30
BRShroyer29-Jul-10 9:30 
GeneralRe: Filling out extent of margins. Pin
dbrenth29-Jul-10 9:32
dbrenth29-Jul-10 9:32 
AnswerRe: Filling out extent of margins. Pin
BRShroyer29-Jul-10 9:26
BRShroyer29-Jul-10 9:26 
QuestionCreating a Binding Resource Pin
BRShroyer29-Jul-10 8:20
BRShroyer29-Jul-10 8:20 
I have a settings page that I want to hide certain settings unless it has been unlocked by a password by someone authorized to make the changes.

Right now what I have:
Visibility="{Binding RelativeSource={RelativeSource AncestorType={x:Type Window}}, Path=Unlocked, Converter={StaticResource ResourceKey=BooleanVisibility}}"


Which works fine. However, it seems extremely time consuming to type that in for every control, even doing copy and paste.

I tried:
 <UserControl.Resources>
   <BooleanToVisibilityConverter x:Key="BooleanVisibility" />
   <Binding x:Key="LockedProperty" RelativeSource="{RelativeSource AncestorType={x:Type Window}}" Path="Unlocked" Converter="{StaticResource ResourceKey=BooleanVisibility}" />
 </UserControl.Resources></pre
And the Visibility of the control set to:
<pre>Visibility="{StaticResource ResourceKey=LockedProperty}"


Which complains that "A 'Binding' cannot be set on the 'Value' property of type 'DictionaryEntry'. A 'Binding' can only be set on a DependencyProperty of a DependencyObject." Which makes sense now that I'm reading it again. It thinks I'm trying to bind UserControl.Resources.

Is there any way to make a binding template or resource that would let me make the binding call a lot simpler?
Brad

Deja Moo - When you feel like you've heard the same bull before.

AnswerRe: Creating a Binding Resource Pin
Abhishek Sur29-Jul-10 10:17
professionalAbhishek Sur29-Jul-10 10:17 
QuestionBinding xaml property to class property Pin
#realJSOP29-Jul-10 5:15
professional#realJSOP29-Jul-10 5:15 
AnswerRe: Binding xaml property to class property Pin
BRShroyer29-Jul-10 7:57
BRShroyer29-Jul-10 7:57 
GeneralRe: Binding xaml property to class property Pin
#realJSOP29-Jul-10 8:16
professional#realJSOP29-Jul-10 8:16 
GeneralRe: Binding xaml property to class property Pin
BRShroyer29-Jul-10 9:02
BRShroyer29-Jul-10 9:02 
QuestionSilverlight : Changing theme at run-time Pin
Prasoon Chaudhary28-Jul-10 23:24
Prasoon Chaudhary28-Jul-10 23:24 
QuestionAlternative to "DropDownWidth" Property for Combo Box in WPF. Pin
dashingsidds28-Jul-10 23:01
dashingsidds28-Jul-10 23:01 
QuestionHow to do UI Design that fix in all the screen size Pin
Joe Rozario28-Jul-10 20:56
Joe Rozario28-Jul-10 20:56 
AnswerRe: How to do UI Design that fix in all the screen size Pin
Pete O'Hanlon28-Jul-10 22:04
mvePete O'Hanlon28-Jul-10 22:04 
GeneralRe: How to do UI Design that fix in all the screen size Pin
Joe Rozario29-Jul-10 2:42
Joe Rozario29-Jul-10 2:42 
QuestionDataVisualization Library Binding Question [SOLVED] Pin
#realJSOP28-Jul-10 9:21
professional#realJSOP28-Jul-10 9:21 
QuestionHow To Create This Trigger Pin
Kevin Marois28-Jul-10 8:47
professionalKevin Marois28-Jul-10 8:47 
QuestionNeed help with this control alignment issue Pin
Michael Eber27-Jul-10 11:59
Michael Eber27-Jul-10 11:59 
AnswerRe:control alignment issue solved Pin
Michael Eber28-Jul-10 5:24
Michael Eber28-Jul-10 5:24 
QuestionBinding Question! Pin
Jammer27-Jul-10 6:10
Jammer27-Jul-10 6:10 
AnswerRe: Binding Question! Pin
Ravi Mori28-Jul-10 0:44
Ravi Mori28-Jul-10 0:44 
AnswerRe: Binding Question! Pin
Pete O'Hanlon28-Jul-10 2:17
mvePete O'Hanlon28-Jul-10 2:17 

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.