contentcontrol Questions

6

Solved

I'm not sure when I should use ContentPresenter instead of ContentControl (and vice-versa). At the moment, I'm using ContentControl pretty much all the time in my DataTemplates. When would ContentP...
Laic asked 17/8, 2009 at 13:34

1

I have following ControlTemplate: <ContentControl Content="{Binding ContentViewModel}"> <ContentControl.Resources> <DataTemplate DataType="{x:Type viewModel:FilledContentViewModel...
Height asked 1/1, 2016 at 15:57

3

By default when you use "ActivateItem(new Control());" your control is loaded into a ContentControl which with the name ActiveItem, fro example. . If I have multiple content controls on my page how...
Dinorahdinosaur asked 31/5, 2011 at 9:38

2

I'm trying to figure out how to make my ContentControl to correctly scroll Horizontally (Vertically its fine at the moment). By correctly i mean i would like to see the content to stretch (expand i...
Ledet asked 14/2, 2014 at 15:3

3

For the life of me I cant seem to figure out this simple task of setting the ContentControl's background color: <ContentControl x:Name="Content03" Width="130" Height="130" Canvas.Top="50" C...
Bascule asked 26/4, 2013 at 10:23

3

Solved

I would think this is possible, but the obvious way isn't working. Currently, I'm doing this: <ContentControl Content="{Binding HurfView.EditedPart}"> <ContentControl.Resources> &...
Thessalonians asked 1/8, 2009 at 19:8

3

I have a ContentControl that I want to change it's ContentTemplate in some event. I want to add some values (text to TextBox) when control in ContentTemplate loaded. But, I has discovered that new...
Fletcher asked 21/11, 2012 at 13:45

4

Solved

I set up a ContentControl.DataTemplateSelector to my desired one. I want that according to a command or whatever, call the ContentControl to reselect the template from the selector by either xaml o...

3

Solved

Im trying to create some chart images without ever displaying those charts on the screen. I'v been at this for quite a while and tried a lot of different things but nothing seems to work. The code ...
Inspectorate asked 1/4, 2010 at 17:29

4

Solved

I need disable standard ContextMenu of TextBox. I've created a new WPF project and added the following: <Window x:Class="WpfApplication3.MainWindow" xmlns="http://schemas.microsoft.com/winfx/2...
Elwaine asked 15/10, 2014 at 14:35

3

Solved

Can anyone tell me why this crashes my app? There seems to be some endless recursion by I can't figure out why. I get this exception Logical tree depth exceeded while traversing the tree. This ...
Abstergent asked 23/12, 2010 at 14:48

1

Solved

I'm currently trying to achieve the functionality of a tabcontrol with hidden tabs by using a ListView (as tabs) and a ContentControl with Binding the Content Property. I read a bit on that topic ...
Teutonize asked 10/4, 2013 at 21:7

1

Solved

I have the following simplified Example: <Window x:Class="TemplateBinding.MainWindow" xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation" xmlns:x="http://schemas.microsoft.com/...

3

Solved

I need to bind a TextBox that meets two criteria: IsEnabled if Text.Length > 0 IsEnabled if user.IsEnabled Where user.IsEnabled is pulled from a data source. I was wondering if anyone had a ea...
Liebman asked 6/9, 2012 at 19:36

2

Solved

I got an enoying problem... Maybe someone can (please!) help. I am using a model that has and enumeration of types and a property that should hold UI models for each selected type from enumeration:...
Unbrace asked 25/5, 2012 at 8:57

2

Solved

I liked this answer, and it almost fit me. But, how can I achieve this if my DataTemplate is in a external ResourceDictionary? I'm using Prism and I provide the DataTemplates (for generic CRUD vi...
Buehler asked 24/1, 2012 at 13:35

1

Solved

We're writing a very specialized ItemsControl which actually has three ContentPresenter's per 'row', each bound to a different object (think poor-man's grid) instead of the more common one, like a ...

1

What's the difference between ContentControl.Template and ContentControl.ContentTemplate? And when do I use which? For example I could write in a xaml file for WPF: <ContentControl> <Co...
Selfish asked 27/9, 2011 at 10:28

1

Solved

When you assign an object to a Content control it will materialize a Visual appropriate for that assigned object. Is there a programmatic way to achieve the same result? I would like to call a func...
Caustic asked 23/8, 2011 at 1:50

3

Solved

I have this in XAML <ControlTemplate TargetType="{x:Type Button}"> <Image ...> </ControlTemplate> I want to achieve same in C# code. How can I achieve this? ControlTemplate c...
Chance asked 22/4, 2011 at 12:36

2

Solved

what is wrong about the following code? I get this error during compilation: The property 'TargetName' does not represent a valid target for the 'Setter' because an element named 'cc' was not fou...
Allotropy asked 17/12, 2010 at 18:46

2

Solved

I want the ContentTemplate to vary according to the value in the DataTrigger. And yes, I considered using a DataTemplateSelector, but now I need a DataTrigger or better said a MultiDataTrigger. Pl...
Karlin asked 19/1, 2010 at 0:11

1

Solved

I have a style for a ContentControl which I want to use in places where I currently have a Border. When I use this, the child controls will not stretch to fill and only take a small amount of space...
Accessible asked 14/9, 2010 at 7:5

2

Solved

Given the following: setting IsTabStop to false on a ContentControl will not prevent its content from acting as a tab-stop setting IsTabStop to true will result in an invisible tab-stop, which do...
Ortrud asked 19/8, 2010 at 13:55
1

© 2022 - 2024 — McMap. All rights reserved.