Click here to Skip to main content
15,913,722 members
Home / Discussions / WPF
   

WPF

 
GeneralRe: Button not firing in WPF Toolkit datagrid Pin
Hannes Larsson18-Feb-10 1:39
Hannes Larsson18-Feb-10 1:39 
GeneralRe: Button not firing in WPF Toolkit datagrid Pin
Member 454056418-Feb-10 10:10
Member 454056418-Feb-10 10:10 
QuestionSharing Core Objects Between Server & Client Pin
Jammer12-Feb-10 7:57
Jammer12-Feb-10 7:57 
AnswerRe: Sharing Core Objects Between Server & Client Pin
Pete O'Hanlon12-Feb-10 9:33
mvePete O'Hanlon12-Feb-10 9:33 
GeneralRe: Sharing Core Objects Between Server & Client Pin
Jammer13-Feb-10 12:51
Jammer13-Feb-10 12:51 
QuestionPopup window in silverlight Pin
xodeblack12-Feb-10 6:01
xodeblack12-Feb-10 6:01 
AnswerRe: Popup window in silverlight Pin
Abhinav S12-Feb-10 8:10
Abhinav S12-Feb-10 8:10 
Questioncontrols visible in designer but not available in window at runtime [modified] Pin
Member 290565112-Feb-10 2:30
Member 290565112-Feb-10 2:30 
Hi,
I wanted to create wpf controls dynamically based on a business model.
for that i tried to use DataTemplates for creation of controls based on values from an array. And then bind the array to ItemControls Itemsource.
I used this example for testing.. This is what i did..

< Window x:Class="Window1" xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
Title="dialog" xmlns:sys="clr-namespace:System;assembly=mscorlib"
Width="393.412" Height="333.4">

< Window.Resources>
< ResourceDictionary 
  Source="ResourceDictionary\ControlCreatorDataTemplate.xaml"/>
</ Window.Resources>

< StackPanel>
< ItemsControl ItemsSource="{Binding Source={StaticResource data}}" Visibility="Visible" />
</ StackPanel>
</ Window>


resource dictionary

< ResourceDictionary  xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
 xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
 xmlns:sys="clr-namespace:System;assembly=mscorlib">
< x:ArrayExtension Type="{x:Type sys:Object}" x:Key="data">
< sys:String>String</ sys:String>
< sys:Boolean>True</ sys:Boolean>
< sys:Boolean>False</ sys:Boolean>
< sys:Double>10.0</ sys:Double>
</ x:ArrayExtension >

< DataTemplate DataType="{x:Type sys:Boolean}" >
< CheckBox Content="CheckBox" IsChecked="{Binding Mode=OneWay}" />
</ DataTemplate >
< DataTemplate DataType="{x:Type sys:String}" >
< TextBox Text="{Binding Mode=OneWay}" />
</DataTemplate >
< DataTemplate DataType="{x:Type sys:Double}" >
< TextBox Text="{Binding Mode=OneWay}" />
</ DataTemplate >
</ ResourceDictionary >

Problem is i am able to view the checkbox and text in the designer window in VS08
When i run the window -> the controls are not visible...

Any help is appreciated

-Jasper
J.p.Jasper

QuestionButton click event within a ControlTemplate? Pin
Richard Dutton12-Feb-10 1:02
Richard Dutton12-Feb-10 1:02 
AnswerRe: Button click event within a ControlTemplate? Pin
rhuiden12-Feb-10 4:59
rhuiden12-Feb-10 4:59 
GeneralRe: Button click event within a ControlTemplate? Pin
Richard Dutton12-Feb-10 5:05
Richard Dutton12-Feb-10 5:05 
QuestionMessage Removed Pin
11-Feb-10 7:39
fjparisIII11-Feb-10 7:39 
AnswerRe: Initial impression: Silverlight much harder than WPF Pin
Not Active11-Feb-10 8:24
mentorNot Active11-Feb-10 8:24 
GeneralMessage Removed Pin
11-Feb-10 8:43
fjparisIII11-Feb-10 8:43 
GeneralRe: Initial impression: Silverlight much harder than WPF Pin
Not Active11-Feb-10 9:18
mentorNot Active11-Feb-10 9:18 
GeneralMessage Removed Pin
11-Feb-10 9:46
fjparisIII11-Feb-10 9:46 
GeneralRe: Initial impression: Silverlight much harder than WPF Pin
Not Active11-Feb-10 10:53
mentorNot Active11-Feb-10 10:53 
GeneralMessage Removed Pin
11-Feb-10 11:21
fjparisIII11-Feb-10 11:21 
GeneralRe: Initial impression: Silverlight much harder than WPF Pin
Not Active11-Feb-10 11:42
mentorNot Active11-Feb-10 11:42 
QuestionSilverlight application does not run Pin
jonatan_55611-Feb-10 1:58
jonatan_55611-Feb-10 1:58 
AnswerRe: Silverlight application does not run Pin
Abhinav S11-Feb-10 6:07
Abhinav S11-Feb-10 6:07 
GeneralRe: Silverlight application does not run Pin
jonatan_55612-Feb-10 3:18
jonatan_55612-Feb-10 3:18 
GeneralRe: Silverlight application does not run Pin
Abhinav S12-Feb-10 8:04
Abhinav S12-Feb-10 8:04 
QuestionPartial-trust on-screen keyboard? Pin
Richard Dutton11-Feb-10 0:01
Richard Dutton11-Feb-10 0:01 
QuestionAnimation problem Pin
fjparisIII10-Feb-10 20:08
fjparisIII10-Feb-10 20:08 

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.