Click here to Skip to main content
15,895,777 members
Home / Discussions / WPF
   

WPF

 
QuestionGenerate Dynamic XAML Pin
the_jat7-May-09 19:42
the_jat7-May-09 19:42 
AnswerRe: Generate Dynamic XAML Pin
Pete O'Hanlon7-May-09 22:32
mvePete O'Hanlon7-May-09 22:32 
QuestionCreate datetime, time and duration control? Pin
salon7-May-09 19:34
salon7-May-09 19:34 
Questiontype-ahead control in WPF Pin
GaneshSharma7-May-09 7:46
GaneshSharma7-May-09 7:46 
AnswerRe: type-ahead control in WPF Pin
sivaddrahcir18-May-09 13:58
sivaddrahcir18-May-09 13:58 
QuestionHow to set AutomationProperty to a WPF ListItem. Pin
tapas19797-May-09 7:00
tapas19797-May-09 7:00 
AnswerRe: How to set AutomationProperty to a WPF ListItem. Pin
tapas19797-May-09 7:02
tapas19797-May-09 7:02 
QuestionHelp needed regarding HeaderedContentControl Pin
Ravi Mori7-May-09 4:37
Ravi Mori7-May-09 4:37 
Hello..
I want some help from you guys in my wpf project.
I prepared my project using MVVM pattern.

I am using HeaderedContentControl and in content presenter of that i am using tab control.

MyControl.xaml

<Window.Resources>
<Style x:Key="HeaderStyle" TargetType="{x:Type HeaderedContentControl}">
<Setter Property="HeaderTemplate">
<Setter.Value>
<DataTemplate>
<Border BorderBrush="LightGray" BorderThickness="1" CornerRadius="5" Margin="4" Padding="4" SnapsToDevicePixels="True">

<TextBlock FontSize="14" FontWeight="Bold" Foreground="White" HorizontalAlignment="Center" Text="{TemplateBinding Content}" />
</Border>
</DataTemplate>
</Setter.Value>
</Setter>
<Setter Property="IsTabStop" Value="False" />
<Setter Property="Template">
<Setter.Value>
<ControlTemplate TargetType="{x:Type HeaderedContentControl}">
<DockPanel>
<ContentPresenter
DockPanel.Dock="Top"
ContentSource="Header"
ContentTemplate="{TemplateBinding HeaderTemplate}"
/>
<ContentPresenter
ContentSource="Content"
ContentTemplate="{TemplateBinding ContentTemplate}"
/>
</DockPanel>
</ControlTemplate>
</Setter.Value>
</Setter>
</Style>

<DataTemplate x:Key="MyWorkingTemplate">
<TabControl
IsSynchronizedWithCurrentItem="True"
ItemsSource="{Binding}"
ItemTemplate="{StaticResource ClosableTabItemTemplate}"
Margin="4"
/>
</DataTemplate>
</Window.Resources>

<HeaderedContentControl
Content="{Binding Path=Workspaces}"
ContentTemplate="{StaticResource MyWorkingTemplate}"
Header="My Tabs"
Style="{StaticResource HeaderStyle}"
/>


In Content template my all bindings working fine with viewmodel..But my problem is,in my header template here i have textblock and now i want here some content control and binding two different views here and show it according to requirement..
Any help??
Question[Message Deleted] Pin
Cl@nd£$t|n07-May-09 0:42
Cl@nd£$t|n07-May-09 0:42 
AnswerRe: Widh & Height with percentage Pin
Pauwels Bart7-May-09 1:05
Pauwels Bart7-May-09 1:05 
QuestionSave the first page of a word as picture Pin
Prajeesh7-May-09 0:28
Prajeesh7-May-09 0:28 
AnswerRe: Save the first page of a word as picture Pin
Pete O'Hanlon7-May-09 0:29
mvePete O'Hanlon7-May-09 0:29 
QuestionHow to use staticresource in .cs Pin
daveyerwin6-May-09 10:42
daveyerwin6-May-09 10:42 
AnswerRe: How to use staticresource in .cs Pin
Mark Salsbery6-May-09 12:24
Mark Salsbery6-May-09 12:24 
GeneralRe: How to use staticresource in .cs Pin
daveyerwin7-May-09 4:57
daveyerwin7-May-09 4:57 
GeneralRe: How to use staticresource in .cs Pin
Mark Salsbery7-May-09 6:33
Mark Salsbery7-May-09 6:33 
QuestionImage in WPF like a google map ? Pin
Mohammad Dayyan6-May-09 9:31
Mohammad Dayyan6-May-09 9:31 
AnswerRe: Image in WPF like a google map ? Pin
Mark Salsbery6-May-09 10:06
Mark Salsbery6-May-09 10:06 
GeneralRe: Image in WPF like a google map ? Pin
Mohammad Dayyan6-May-09 10:12
Mohammad Dayyan6-May-09 10:12 
GeneralRe: Image in WPF like a google map ? Pin
Mark Salsbery6-May-09 12:37
Mark Salsbery6-May-09 12:37 
Question'modified' tag in WinForms - WPF Equivalent Pin
dlog1975-May-09 18:44
dlog1975-May-09 18:44 
AnswerRe: 'modified' tag in WinForms - WPF Equivalent Pin
Pete O'Hanlon5-May-09 22:15
mvePete O'Hanlon5-May-09 22:15 
GeneralRe: 'modified' tag in WinForms - WPF Equivalent Pin
Philipp Sumi6-May-09 22:01
Philipp Sumi6-May-09 22:01 
GeneralRe: 'modified' tag in WinForms - WPF Equivalent Pin
Pete O'Hanlon7-May-09 11:37
mvePete O'Hanlon7-May-09 11:37 
GeneralRe: 'modified' tag in WinForms - WPF Equivalent Pin
Pete O'Hanlon7-May-09 11:54
mvePete O'Hanlon7-May-09 11:54 

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.