Click here to Skip to main content
15,921,113 members
Home / Discussions / WPF
   

WPF

 
QuestionWCF DataContract Structs Pin
Jammer2-Jun-09 1:17
Jammer2-Jun-09 1:17 
AnswerRe: WCF DataContract Structs Pin
Pete O'Hanlon2-Jun-09 1:34
mvePete O'Hanlon2-Jun-09 1:34 
GeneralRe: WCF DataContract Structs Pin
Jammer2-Jun-09 8:10
Jammer2-Jun-09 8:10 
QuestionDatabinding? Pin
#realJSOP1-Jun-09 23:51
professional#realJSOP1-Jun-09 23:51 
AnswerRe: Databinding? Pin
Pete O'Hanlon2-Jun-09 0:04
mvePete O'Hanlon2-Jun-09 0:04 
GeneralRe: Databinding? Pin
#realJSOP2-Jun-09 0:08
professional#realJSOP2-Jun-09 0:08 
GeneralRe: Databinding? Pin
ABitSmart2-Jun-09 0:39
ABitSmart2-Jun-09 0:39 
GeneralRe: Databinding? Pin
Pete O'Hanlon2-Jun-09 0:40
mvePete O'Hanlon2-Jun-09 0:40 
I really should read these posts more carefully. What you need to do is set your binding up explicitly, as in:
<Window x:Class="JsopBinding.Window1"
  xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
  xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
  Title="Window1" Height="300" Width="300" x:Name="myWindow"> <-- Set the name here - you need it below -->
  <Window.DataContext>
    <Binding ElementName="myWindow" Path="Properties" /> <-- Now, set up the data context binding -->
  </Window.DataContext>
  <Grid>
    <TextBox 
      Name="textboxScrambled" 				 
      Height="23" 				 
      Width="126" 				 
      HorizontalAlignment="Left" 				 
      VerticalAlignment="Top" 				 
      Margin="111,6,0,0" 				 
      IsReadOnly="True" 				 
      MaxLines="1" 				 
      MaxLength="10" 				 
      CharacterCasing="Upper" 				 
      Text="{Binding Path=ScrambledWord, Mode=OneWay}" />
  </Grid>
</Window>
And, in your code behind you add the property:
public FormProperties Properties
{
    get { return m_formProperties; }
    set { m_formProperties = value; }
}
Alternatively, you can assign your datacontext directly in the code behind as
this.DataContext = m_formProperties;


"WPF has many lovers. It's a veritable porn star!" - Josh Smith

As Braveheart once said, "You can take our freedom but you'll never take our Hobnobs!" - Martin Hughes.


My blog | My articles | MoXAML PowerToys | Onyx



GeneralRe: Databinding? Pin
#realJSOP2-Jun-09 2:25
professional#realJSOP2-Jun-09 2:25 
GeneralRe: Databinding? Pin
Pete O'Hanlon2-Jun-09 2:32
mvePete O'Hanlon2-Jun-09 2:32 
GeneralRe: Databinding? Pin
#realJSOP2-Jun-09 3:11
professional#realJSOP2-Jun-09 3:11 
GeneralRe: Databinding? Pin
Pete O'Hanlon2-Jun-09 3:16
mvePete O'Hanlon2-Jun-09 3:16 
GeneralRe: Databinding? Pin
#realJSOP2-Jun-09 3:28
professional#realJSOP2-Jun-09 3:28 
QuestionList Control in WPF Pin
krishnan.s1-Jun-09 21:45
krishnan.s1-Jun-09 21:45 
AnswerRe: List Control in WPF Pin
Pete O'Hanlon1-Jun-09 23:10
mvePete O'Hanlon1-Jun-09 23:10 
QuestionWord wrap in RichTextBox Pin
hain1-Jun-09 10:25
hain1-Jun-09 10:25 
Questionhow to close a window.. Pin
Hema Bairavan1-Jun-09 0:18
Hema Bairavan1-Jun-09 0:18 
AnswerRe: how to close a window.. Pin
ABitSmart1-Jun-09 6:00
ABitSmart1-Jun-09 6:00 
QuestionVisualChildrenCount.. Pin
Hema Bairavan1-Jun-09 0:10
Hema Bairavan1-Jun-09 0:10 
AnswerRe: VisualChildrenCount.. Pin
Pete O'Hanlon1-Jun-09 1:28
mvePete O'Hanlon1-Jun-09 1:28 
GeneralRe: VisualChildrenCount.. Pin
Hema Bairavan1-Jun-09 1:33
Hema Bairavan1-Jun-09 1:33 
GeneralRe: VisualChildrenCount.. Pin
Pete O'Hanlon1-Jun-09 1:46
mvePete O'Hanlon1-Jun-09 1:46 
Questiontaking the control Pin
Hema Bairavan31-May-09 22:29
Hema Bairavan31-May-09 22:29 
AnswerRe: taking the control Pin
ABitSmart31-May-09 22:46
ABitSmart31-May-09 22:46 
AnswerRe: taking the control Pin
Pete O'Hanlon31-May-09 22:47
mvePete O'Hanlon31-May-09 22:47 

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.