contentpresenter Questions
5
Solved
I have created the following style for a listbox that will have an image displayed next to some text:
<Style x:Key="ImageListBoxStyle" TargetType="{x:Type ListBox}">
<Setter Property="Sn...
Disjointed asked 30/10, 2008 at 9:35
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
6
I searched a lot for this but couldn't find any package or a guide on how to view a ".ppt" file on a webpage using react.js.
I'm allowing the user to upload a ".ppt" file, and I want him to be abl...
Dent asked 7/2, 2020 at 15:6
5
Solved
I'd like to create a UserControl (in this case a square-Button with defined Backgroundcolors) which can host it's own content.
UserControl:
<UserControl x:Class="SGDB.UI.Controls.ModernButton"...
Largess asked 6/4, 2016 at 9:7
2
Solved
Is there a simple way to just get TextTrimming to work with a ContentPresenter?
I have implict styles for TextBlock and AccessText that have TextTrimming set to CharacterEllipsis, but it's not pi...
Epilate asked 27/4, 2011 at 21:37
3
Solved
I'm new to WPF and I'm trying to create an UserControl which will have some nested content.
<my:InformationBox Header="General Information" Width="280">
<StackPanel>
<Label>Lab...
Bacchus asked 19/7, 2012 at 9:57
1
Solved
I'm working on a modal dialog popup (I'm not sure about the exact UX term) that is displayed inline, inside of a control or window with darkened background.
Visual example
What I tried is putti...
Barboza asked 14/12, 2016 at 19:18
4
Solved
I have a following grid:
<Grid>
<Grid.RowDefinitions>
<RowDefinition Height="Auto"/>
<RowDefinition Height="*"/>
<RowDefinition Height="Auto"/>
</Grid.RowDefi...
Giordano asked 4/12, 2013 at 14:18
2
Solved
If I assign a piece of text to the Content property of a ContentPresenter, a TextBlock control is generated by the ContentPresenter at render time to contain that text.
If I create a style that ap...
Fernald asked 19/10, 2010 at 16:1
3
Solved
I have the following ListView in my code. views:GameCard is a custom UserControl and {Binding} is a valid DataContext object with three items. Without the custom ItemContainerStyle everything works...
Dislocation asked 14/1, 2013 at 17:12
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 ...
Pirouette asked 27/9, 2011 at 19:15
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
2
Solved
I've created a simple WPF application which has two Windows. The user fills in some information on the first Window and then clicks Ok which will take them to the second Window. This is working fin...
Hereabouts asked 6/5, 2011 at 9:31
2
Solved
I have a DataTemplate:
<DataTemplate x:Key="myTemplate">
...
</DataTemplate>
I want to use it as the ContentTemplate of a ContentPresenter:
<ContentPresenter Content="{Binding X...
Merciless asked 11/4, 2011 at 9:43
1
Solved
Basically, I don't understand what the real difference here is:
The Microsoft code for TabItem uses:
<ContentPresenter ContentSource="Header" ... />
So, when would one use the Content pro...
Eleventh asked 8/4, 2011 at 20:2
2
Solved
I'm learning WPF and the MVVM Pattern and I'm trying to build a calendar-like view.
So I currently have a Grid with 6 rows and 7 columns.
The first row should be the Header, thus specifying the Wee...
Feigned asked 24/12, 2010 at 8:18
2
Solved
I have a custom template for an expander that is close to the code below. I had to change some of the code to take out custom classes, brushes, etc..
<Style TargetType="{x:Type Expander}">
...
Lighterage asked 30/12, 2008 at 21:41
1
Solved
It seems like having a ContentPresenter in my ListBoxItem.ContentTemplate is causing Visual Studio to crash?
<ListBox>
<ListBox.ItemContainerStyle>
<Style TargetType="ListBoxItem"...
Acetylene asked 10/11, 2010 at 13:43
3
Solved
Why does the following simplified code not sets the font-size of the TextBlock to 50?
<Window.Resources>
<ControlTemplate TargetType="ContentControl" x:Key="Test">
<ContentPresent...
Impanation asked 17/6, 2010 at 15:44
1
I'm trying to customize the column headers of a DataGrid to show sub-column headers as in the following screenshot:
I've made a style for 2 sub-columns as in the following XAML:
<UserContro...
Mcfarlane asked 21/3, 2010 at 15:16
3
Solved
I am developing LOB application, where I will need multiple dialog windows (and displaying everything in one window is not an option/makes no sense).
I would like to have a user control for my win...
Ploughman asked 22/6, 2009 at 23:47
1
So far, I have this:
<UserControl
x:Class="MyConcept.ExpanderPanel"
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"&g...
Parka asked 19/10, 2009 at 1:24
1
© 2022 - 2024 — McMap. All rights reserved.