Hello developers. I have some class with properties firstName and lastName. I want bind TextBlock to concatanation of this two properties. I know that I can create third property that will be return concatanation of these properties. But I dont want to use this approach. Is it possible to Bind TextBlock to two properties. and also I dont...
So what I want to accomplish is that I have a listbox of items (for example: items in a basket) and when I mouse over one of them, I want to see a detailed view in another part of my window (with image and all that).
BASICALLY what I did works - but there are three things that I don't like:
a) I use "ItemsControl" so I have to bind the...
I use this style for all my labels
<Style TargetType="Label" x:Key="LabelStyle">
<Setter Property="Template">
<Setter.Value>
<ControlTemplate TargetType="Label">
<StackPanel Orientation="Horizontal" >
<TextBox Loaded="MyTextBlock_Loaded" x:Name="EditCon...
Hi,
I have my silverlight app which pulls data into a datagrid from a view model. The vm is exposed via Mef. I also have a details grid which has comboboxes. The vm also contains the data to populate the combobox values. Upon first load, everything works fine and the selected items on te comboboxes are correct and I can select alternati...
In a windows forms application, a property change that triggers INotifyPropertyChanged, will result in the form reading EVERY property from my bound object, not just the property changed. (See example code below)
This seems absurdly wasteful since the interface requires the name of the changing property. It is causing a lot of clockin...
Good day. I'm developing a Windows application and working with Windows Forms; .Net 2.0.
I have an issue databinding a generic List of Car Rental Companies to a DataGridView when that list contains (one of its properties) anoother generic List of Car Makes. I also have a UserControl that I need to bind to this [inner] generic list ......
Hi All.
I'm trying to understand databinding in Winforms apps and have developed a test app with odd behaviour. I have bound the Checked property of the Checkbox control to a single-row, single(bool)-column DataTable object. Checking the box updates the DataTable cell fine as you would expect, however I would also like to change the Che...
Im using c#.net windows form application. I have an xml file that contains nodes. I need to populate a treeview with the nodes present in the xml file. Also avoid repeated node names. For this my idea is while populating the treeview, copy the node names into a list and there see if the node already exits. If it already exits, go to the ...
ViewModel
I have a property of type Member called KeyMember. The 'Member' type has an ObservableCollection called Addresses. The Address is composed of two strings - street and postcode .
View
I have a ListBox whose item source need to be set to ViewModels's KeyMember property and it should display the Street of all the Past Addresses...
I have a radioButton group and each Button is binded to an Enum property
<RadioButton Name="rbFixedDiscount" IsChecked="{Binding Path=DiscountType, Mode=TwoWay, Converter={StaticResource EnumConverter},ConverterParameter=Fixed, UpdateSourceTrigger=PropertyChanged}" >Fixed:</RadioButton>
<RadioButton Name="rbPercentDiscount" Grid.Row="1...
I want to databind a textblock to some CLR objects so I can display details about a users system.
Example:
TextBlock Grid.Column="1" Text="{Binding Path=System.Environment.OSVersion}"
How can I pull this type of thing off?
...
Hi,
I have TreeView with hierarchical data binding. I want to get TreeViewItem.Header controls not my MVVM. I can get TreeViewItem using TreeView.ItemContainerGenerator.ContainerFromIndex() method... but how to get TreeViewItem.Header ?
Regards,
Marcin
...
Hi all,
In a web application I'm working on using Spring 2.5.6.SEC01, I essentially have an Integer field that takes a number to determine which page to scroll to. The requirements changed, and we no longer want to display an error message, but simply ignore the user's input if they enter an invalid number, say "adfadf".
I was reading...
Hello,
I am trying to come to a working understanding of how databinding works, but even after several tutorials I only have a basic understanding of how databinding works. Thus this question might seem fundamental to those more familiar with silverlight. Even if it is trivial, please point me to some tutorial that deals with this prob...
Normally wpf objects inherits their parent's data context, so if you set a binding and theres no data context set, the binding engine it will automatically look for it in the parents. How can I make a custom class(that is not an UI element) to produce the same behavior when set as the child of another element?
...
I have an ASP.NET user control that is used in another use control. The parent user control uses data-binding to bind to a custom property of the child user control.
What method can I override or page event where I am ensured that the property state is set?
I think in a page it is PageLoaded versus the Page_Load override? I am looking ...
I'm having trouble binding a ComboBox to a foreign key in WPF using Linq To SQL. It works fine when displaying records, but if I change the selection on the ComboBox, that change does not seem to affect the property to which it is bound.
My SQL Server Compact file has three tables: Players (PK is PlayerID), Events (PK is EventID), and ...
I'm just starting to work with Silverlight (no WPF experience either) and am having a difficult time finding a source that provides a full explanation of Data Binding. There is absolutely no lack of tutorials (starting with the ones on Silverlight.net or Scott Gu's blogs), but everything I have found is "by example".
Is there a resourc...
the dropdown list is showing data from database, but how to retrieve the selected value and store it in a session variable??
...
Hi guys,
I am in commercial development for few months only,
the team leader is not using gridview, detailsview, formview, repeater, datalist.
we alwyas write our own looping to dislpay the data even it is read only.
He said : we do this for better performance.
and I am always thinking, so why microsoft create them???
I checked othe...