templatebinding Questions
3
Solved
When i use *ngFor in angular with a function returning my data, the function is called multiple times, and sometimes resulting even in a loop:
app.component.ts
export class AppComponent {
ge...
Barm asked 18/4, 2019 at 3:36
3
Solved
I'm trying to do something like this...
<Style
x:Key="MyBorderStyle"
TargetType="Border">
<Setter
Property="Padding"
Value="{TemplateBinding Padding...
Romeu asked 29/8, 2009 at 14:58
1
Solved
Lets say I have the following getter/setter methods
get next() {
console.log(this.people[this._index], this._index);
return this.people[this._index];
}
set next(i: any) {
this._index...
Ice asked 12/8, 2017 at 9:33
2
Solved
I wonder if it is possible to bind a structure element like BorderThickness.Top to TemplatedParent's corresponding property. I have tried
<Border Margin="0" Padding="{TemplateBinding Padding}" ...
Doubloon asked 8/9, 2009 at 8:43
1
Solved
I'm trying to displaying data from wordpress site in angular2 app, the wordpress post's content can contain DOM elements, but I want to render it instead of displaying it as a text.
I'm using rest...
Elburt asked 22/11, 2015 at 4:39
1
Solved
I'd like to do something like this is a Style:
Value="{x:Bind MyCustomDependencyProp, RelativeSource={RelativeSource TemplatedParent}}"
Is that possible? Are there any performance benefits?
Us...
Webster asked 3/9, 2015 at 9:38
4
Solved
I am creating a WPF custom control, a Button with an Image and Text. I have added two dependency properties to the control, ImagePath and Text, and the control template (in Themes\Generic.xaml) is ...
Howell asked 20/12, 2009 at 14:7
1
I am building a button style that relies on converting a colour brush to a darker shade to create a shadow. In regular XAML I have a converter than I use on the binding that works perfectly:
Borde...
Clavicorn asked 2/3, 2015 at 1:48
2
Solved
I have a custom control called EnhancedTextBox which is a UserControl that has a TextBox and a Button. To the consumer I want it to mostly look like a TextBox, so I did the following:
<UserCont...
Besiege asked 9/1, 2014 at 20:35
4
Solved
I am writing a WPF control that subclasses a Button. I then provide a default style in Themes\generic.xaml, that looks like this (simplified):
<Style TargetType="{x:Type WPFControls:MyButton}"&...
Sinistrocular asked 24/11, 2009 at 23:14
1
Solved
I am new one to create UserControl and now I am trying to customize the UserControl Template as below:
<UserControl x:Class="WpfApplication1.PieButton"
xmlns="http://schemas.microsoft.com/winf...
Essam asked 20/2, 2013 at 7:10
1
Solved
I am making a custom control in WPF. I am still learning the ins-and-outs of what a TemplateBinding is (used a lot in custom controls).
One think I am noticing is that I can't seem to use a Templa...
Loisloise asked 15/1, 2013 at 16:52
4
Solved
Looks like the following Ellipse in ControlTemplate does not get the BorderThickness, but why?
<Window.Resources>
<ControlTemplate x:Key="EllipseControlTemplate" TargetType="{x:Type Text...
Ladonna asked 26/11, 2009 at 14:26
2
Solved
I am trying to create control which will take ItemsSource and InnerTemplate and will show all the items wrapped in CheckBoxes.
The control has 2 dependency properties:
public static readonly Depe...
Immediately asked 8/1, 2011 at 17:40
6
Solved
What is the difference between these 2 bindings:
<ControlTemplate TargetType="{x:Type Button}">
<Border BorderBrush="{TemplateBinding Property=Background}">
<ContentPresenter />...
Encompass asked 15/7, 2009 at 12:52
2
Solved
I have a standard style for my buttons but I want certain parts of the style to be configurable. e.g. I have a border appear when MouseOver is triggered for the button and I want the border colour ...
Leena asked 10/2, 2012 at 17:59
2
Solved
I'm trying to use a custom control in a WPF app, and I have some problem using a StringFormat binding.
The problem is easy to reproduce. First, let's create a WPF application and call it "Temp...
Quilting asked 27/12, 2011 at 12:59
2
Solved
In the following XAML I'm using a Rectangle with a Border as the Template for a ToggleButton.
I want the BorderBrush to be a different colour to reflect the changing value of ToggleButton.IsChecked...
Amity asked 21/7, 2011 at 0:26
2
Solved
This is how I reproduced this problem in WPF:
Create a custom control:
public class TestCustomControl : Control
{
static TestCustomControl()
{
DefaultStyleKeyProperty.OverrideMetadata(typeof(Tes...
Piscary asked 14/6, 2011 at 16:8
4
Solved
I have the following control template.
I wish to set the source property for the image control in the control
template using Template Binding.
But since this is a control template for button c...
Priapism asked 9/1, 2011 at 10:47
2
Solved
New to WPF and have Tabs and in each tab the content is presented in a curved corner panel/window/whateveryouwannacallit. I wasn't sure how to do this ( Style, ControlTemplate ) but decided to go t...
Ailey asked 25/6, 2010 at 13:15
2
I use this style for all my labels
<Style TargetType="Label" x:Key="LabelStyle">
<Setter Property="Template">
<Setter.Value>
<ControlTemplate TargetType="Label">
<S...
Ultramontane asked 12/5, 2010 at 10:46
1
Solved
I'm creating a game desk. I wanted to specify field size (one field is a square) as a attached property and with this data set value of ViewPort which would draw 2x2 matrix (and tile mode would do ...
Wilone asked 6/4, 2010 at 15:39
1
© 2022 - 2024 — McMap. All rights reserved.