I'm working on a custom panel control and one of the things I'm trying to have it do is swap it's content at run-time. There's two states to this control: Maximized and Normal. When the user clicks a button on the control the state switches. There's two properties on this control: MaximizedContent and MinimizedContent. When the button to...
I want to put a command on a ListBoxItem. The ListBoxItem use a DataTemplate composed of a StackPanel (containing an Image and a TextBlock, both using Binding). I want that the doubleclick on that ListBoxItem fire the command.
I have tried this :
<DataTemplate>
<StackPanel>
<StackPanel.Resources>
<CommonUI:Comma...
Using sqlite3, if my query is
SELECT * FROM table WHERE title LIKE '%x%'
It will match strings that contain x. I want to make x a bindable parameter, like:
SELECT * FROM table WHERE title LIKE '%x?%'
However, this does not work since the '' form a string literal. Is there some way of escaping the ? within the literal? I understand th...
Hi,
I have a textbox bound to a property. The property continously gets updated from a timer. What I'm trying to do is to make it so that when I'm in the middle of typing something in the textbox, the textbox should stop updating itself from the property. Is there a way to do that?
Thanks!
...
In “Wpf Browser Application” project. Page:
<Page.Resources>
<local:SomeClass x:Key="someClass" Value="String from XAML"/>
</Page.Resources>
<StackPanel>
<TextBox Text="{Binding Source={StaticResource someClass}, Path=Value}" />
</StackPanel>
and class:
internal class SomeClass
{
public SomeClass()
{
Value = "...
Ok, here's a problem I'm having.
I have Lua bindings to a rendering engine that has an internal render manager that keeps its own track of pointers for the render scene and manages them. The problem is that when I'm using it from Lua, if i don't keep a Lua reference to every single object i add to the C++ render manager, it starts to ga...
I have this ItemsControl in my View:
<ItemsControl
ItemsSource="{Binding ItemPageItemViewModels}"
ItemTemplate="{StaticResource ItemPageItemViewModelsTemplate}"/>
And above it I have this DataTemplate which renders all the items:
<DataTemplate x:Key="ItemPageItemViewModelsTemplate">
<TextBlock Text="{Binding Title}"/>
</...
Okay, similar questions exist, but they are all about how to determine this from outside of the entity itself and use the DataContext the entity is attached to.
I am binding my entities to an edit form in WPF. Within a DataTemplate, I want to be able to set the background color of the root container within a DataTemplate to show it has...
Hi,
I need to access the value of a bound item several times in a template. Right now my ListView template looks like this:
<asp:ListView ID="ListView1" runat="server" ItemPlaceholderID="plc"><br/>
<ItemTemplate><br/>
<input type="radio" class="myrating<%# DataBinder.Eval(Container.DataItem, "Day")%>" value="3" /><br/>
<input type...
I have a textbox that i am binding to the viewmodel's string property. The string property is updated within the viewmodel and it displays the text within the textbox through binding.
The issue is that i want to insert the line break after a certain number of characters in the string property and i want that the line break is shown over...
The big picture: I have a custom child control that generates various textboxes, datepickers, combo etc based on properties that I set. This control is embedded in various places within my SL application.
I generally use the MVVM pattern, and I want to bind the values of these dynamic controls back into my master page view model.
I al...
I need to bind width property of the GridView column that is created dynamically in code.
Since GridViewColumn object has no SetBinding method, how should I do this?
Thanks in advance.
...
I would like to have Ctrl-l for clear in my Bash.
How can you bind Ctrl-l to clear in Bash?
...
Is it just me or does changes produced by refreshing the LINQ DataContext not result in Changed Events?
I have a multiuser Application which has an simple atomar locking system to prevent conflicts.
So if an User changes something in the database I need to trigger Refresh on the Datacontext to reload the concerning objects.
A breakpoin...
Is there a way to set a Label's Content property to both a Binding Expression AND a static string value? I want to be able to display something like this:
"Current Value: [Value From Binding]"
I was thinking something like this would work, but apparently it doesn't:
<Label Content="Current Value: {Binding ElementName=SomeTextBox, Pat...
I have a tab item with 2 tab pages. I want to place 4 check boxes in each of the tab pages with all check boxes having the same property. How it can be done easily?
...
The Scenario Bit:
On one of the controls within my Silverlight application I have embedded a custom user control. Within this embedded control is another custom user control that contains a datagrid. I would like to use binding to populate the datagrid. Easy enough I just sepcificy a collection that is in the DataContext of the parent c...
I found some items regarding this questions on SO, but they do not satisfy me. They talk about INotifyProperyChanged, but that does not help in my case.
I have a Combobox.
For the ItemsSource, I use a MultiBinding and a Converter to create an ICollectionView. The ICollectionView gets bound to the ItemsSource.
On the GotFocus-event, thi...
I am trying to bind the Text of a TextBox named 'txtImage' to an image using the following code with no results:
<Image Source="{Binding ElementName=txtImage, Path=Text}" />
What would the right approach be?
...
I'm trying to bind a XAML ComboBox so that its list items are the members of the System.IO.Ports.Parity enum.
I've found plenty of examples of databinding enums, but it seems these don't work if the enum is in a different namespace (like System.IO.Ports).
Right now I have:
<ObjectDataProvider MethodName="GetValues" ObjectType="{x:Ty...