I'm trying what should be an easy bind in my user control:
<UserControl x:Class="MyApp.FlowNode" ...>
<StackPanel>
<Label Content="{Binding Path=Header, RelativeSource={RelativeSource Self}}" />
</StackPanel>
</UserControl>
With the underlying code being:
public partial class FlowNode : UserControl
{
public FlowNo...
I have a question regarding the binding
I have two textbox, textbox one is bind to the property NAME and has the tag FULLName
< TextBox Name="NewTextBox" Tag="FullName" Text="{Binding Path = Name}" >
In the second textbox I need to bind to the property that is available as the tag on the first textbox.
How to do it in XAML?
...
Hello,
I have an wpf mvvm application. I try to write checkbox list control.
I can bind the checkbox list elements.
Added to this issue, I want to get sum of the selected checkbox list elements values.
I added DependencyProperty and bind it to view model property.
But, they dont fire each other.
CheckBoxList User Control Xaml
<ListB...
I'm trying to bind a datagrid to data from within a collection of a collection of the datacontext. The result should be as though all of the nested collections were just one collection with the parent collection properties still available.
For example
I have a series of products associated to an order and each product can have multipl...
I have a pretty simple local service that I'm trying to bind to my activity. I worked through this yesterday with CommonsWare and he got me straightened out as I was having a difficult time getting the service to bind. It turns out that the reason I was having so much trouble was that I was trying to bind the service with:
bindService...
Hi,
I want to create a canvas where a user can drop UI elements (representing tasks). He can then drag them to rearrange them. The elements are contained in an ObservableCollection that is the DataContext.
I can set the Left and Top properties of the Canvas, but the objects position is not affected. Any ideas?
Thanks,
Karel
UPDATE...
I have a Collection of Model-objects in my ViewModel. I would like to be able to bind a TabControl to these and use a DataTemplate to extract the information from the Model-objects. When I try to do this I get the errormessage: Unable to cast object of type Model to object of type TabItem. After spending some time looking for a solution ...
Hello.
I have an int variable, e.g.
int i = 100;
What I want to do is binding a ddl with 100 listitems, from 1 to 100.
I could cycle the variable and for each number adding a ListItem to the ddl, but I'd like to know if there's an alternative, something like value the DataSource with the variable.
Thanks
...
Is it possible to bind all widgets to one command, with a single line? It would be nice if I could type in one line as opposed to doing each widget individually.
...
I've spent hours on this so any help is much appreciated:
I have a TextBlock inside a DataTemplate which has an ItemsSource already set. I want to bind the Text of the TextBlock and set the Path to whatever the path is of a different object in code-behind. I've tried everything I can think of even this:
<TextBlock Text="{Binding Path='...
Hello,
I'm having some difficulties with null and a ComboBox in WPF/C#; If a add a null item it is not shown/listed in the ComboBox.
Here is de XAML declaration of my ComboBox
<ComboBox ItemsSource="{Binding Path=MyList}"
SelectedItem="{Binding Path=Type}" />
MyList is declared as
public ObservableCollection<Type> MyList...
I have a page in which I have a grid with 2 columns, one accommodating 80* width and the other accommodating 20*. Beneath the grid is a stack panel to which I load UI elements (child stack panels) at runtime.
My objective is to bind the widths of the stackpanels to the columns of the grid. This works perfectly and the stackpenels resiz...
I have the following XAML:
<UserControl.Resources>
<DataTemplate x:Key="ExpanderTemplate">
<Grid>
<Rectangle Stroke="Black" StrokeThickness="1" Width="10" Height="10" Fill="White" />
<Rectangle Stroke="Black" StrokeThickness="1" Width="6" Height="1" Fill="Black" />
<Rectangle Stroke="Black" StrokeThickness="...
The title really says it all here. I am a little unclear on how I would set the SelectedValuePath of a TabControl to the text of the selected TabItems header. I feel like this should be fairly simple, and probably involves content.something but I have always been a bit confused about the Content property.
Thanks
...
Or "how do you make sure all your bindings stay correct?"
(this is kinda lengthy, but bear with me, I tried to make it as short as I could)
Consider the following example:
<TextBox Name="tb" />
<TextBlock Text="{Binding Text.TheProp, ElementName=tb}" />
It is perfectly known at compile time that the binding is incorrect (i.e....
I'd really like to get more into D, but the lack of good library support is really hindering me. Therefore I'd like to create some D bindings for existing C libraries I'd like to use. I've never done any binding, but it doesn't look too difficult either.
I'm planning to do this for D2 (not specifically D1, but if it could be for both, e...
function addFav(){
$.ajax({
url: "/favorites/add",
data: {"id": articleID},
success: function(){
$('a#fav')
.addClass('active')
.attr('title','[-] Remove as favorite')
.unbind('click')
.bind('click','removeFav')
;
}
}...
Hi,
I'm working on a photo gallery for Windows Phone 7 and I'm trying to get each image to take the full screen and slide horizontally.
What I am doing so far is to use a listbox that I have modified to scroll horizontally but the problem is that I can't seem to find a way to bind the width and the height of the ListboxItem with the A...
I am using MVVM in my Silverlight app. When control visibility is need to be managed by data, I am connecting its 'Visibility' property to object's corresponding property:
XAML:
<TextBlock Text="Price" Visibility="{Binding PriceVisibility, Mode=OneWay}"/>
<TextBox Text="{Binding TicketPrice, Mode=TwoWay}" Visibility="{Binding PriceVisi...
Hello. I use XPF.Grid.GridControl, bind to IEnumerable data
gridControl.DataSource = dataSource;
I need highlight row depend on cell value. Cell contains color name.
Ok I use:
<dxg:GridControl.Resources>
<Style x:Key="ColorRowStyle" TargetType="{x:Type dxg:GridRowContent}">
<Setter Property=...