Hi All,
I am creating a search page for books. There are lacks of data in the database. If the data size is more than 2000 the application is getting hanged. ItemsSource of the listbox having the data but something wrong is happening behind.
Code
<ListBox Grid.Column="1" x:Name="lbResult" ItemsSource="{Binding}" SelectionChanged="lb...
In my App.xaml file I defined folowing Control Template :
<ControlTemplate x:Key="PushPinTemplate">
<Grid>
<Image Source="Images/konzum.png" Width="35" Height="35" />
<TextBlock Text="{Binding numberOfChildren}" />
</Grid>
</ControlTemplate>
And in my Main.xaml.cs file I'm adding Pushpins to a B...
I know its strange what I am doing but I want this to work. I am going wrong somehwere I feel.
I have a DataTemplate defined in my resources as follows :
<UserControl.Resources>
<ResourceDictionary>
<ResourceDictionary.MergedDictionaries>
<ResourceDictionary Source="../ParameterEditorResourceDictionary.xaml"><...
So I have the following xaml The parent list view is bound to collection programmatically All of the binding works great except for the datagrid doesn't populate. Is there an additional step I need to take or should I just cheat and bind it on the back end.
<ListView.ItemTemplate>
<DataTemplate>
<Border Bor...
I have been using data binding for several years with win forms, but now with more rich and full featured data binding in wpf I can easily do stuff that would have taken a lot of code in winforms. Lurking beneath the surface is an unsettling feeling that all of this is a little to automagic and that if I break something I may not be abl...
I have a DataForm bound to the selectedItem of a listbox. Before the user selects an item in the listbox the DataForm is blank, by that I mean there is absolutely nothing displayed, no labels, textboxes or anything. Once the user selects an item in the listbox then then the form renders data as expected.
How do I get the form to displ...
Not sure if this makes sense but:
I have a form with a number of TableAdapters attached (bound in VS).
Depending on user selection, a DataTable is filled by one of the TableAdapters and passed to another form for display/Edit in a DataGridView. How do I then persist any changes to the DataTable back to the database?
I need to identif...
I have an array for type Person
Person[] Traders = GetTraders();
Person class contains data objects such as first name, last name etc.
I want to add all first names to a dropdownlist. How can i do that? I tried doing it like this, but it won't get the first names:
ddl_traders.DataSource = traders;
EDIT
Person has the following st...
I have an array of type Person, which contains string objects: FirstName, LastName, login.
I have this bound to a dropdownlist.
Now along with this array, I also want to display one more item called "Desk". How can i do that?
My current code is:
Person[] traders = GetTraders();
ddl_trader.Items.Clear();
ddl_trader.DataSource = trader...
Hello, I have a DataSet bound to the Window.DataContext; I also have a DataGrid
<DataGrid ItemsSource={Binding Tables[Items]}>
<DataGrid.Columns>
<DataGridTextBoxColumn Header={Binding Path=DataContext.Tables[Names]/Test, RelativeSource={RelativeSource FindAncestor, AncestorType={x:Type Window}}} />
</DataGrid.Columns>
<...
Well, I am not alone who is being sick of magical strings which are constantly used just to do data binding -- see:
http://stackoverflow.com/questions/1329138/how-to-make-databinding-type-safe-and-support-refactoring
However I am concerned with performance of this solution and much more typing -- each time you would like to use nameof ...
Hi all,
Today i tried joining a date and time picker controls in a new DateTimePicker control. It works fine from the codebehind but our project is following the MVVM model so i need to bind this control with XAML to our context variable.
The code for the control is (sorry its the full code but i dont know where the problem is):
publ...
I want to set the BorderThickness of a Border of a UserControl using 4 TextBoxes, but I can't get it to work.
XAML code demonstrating the problem (only this code in combination with the converter is needed):
<Window
x:Class="BorderThicknessBindingTest.MainWindow"
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation...
I have a simple WCF 4.0 service with some simple methods and a property with a getter that returns List. The service works fine when connected to programatically. The getter is decorated as are the other methods on the Interface that define the service contract.
My next move is to make the service accessible via the IE web browser so se...
I store True/False values as bit fields in SQL Server. The fields are nullable. What is the XAML syntax to bind a bit field to a WPF combo box so the user can choose True/False or blank (null)?
By the way, I'm binding to a strongly-typed dataset/datatable. Drag and drop binding has simplified binding to other datatypes. I certainly don...
Hey all,
Is there an easy way to databind a label AND include some custom text?
Of course I can bind a label like so:
someLabel.DataBindings.Add(new Binding("Text", this.someBindingSource, "SomeColumn", true));
But how would I add custom text, so that the result would be something like:
someLabel.Text = "Custom text " + databoundColu...
Hi-
I'm new to Silverlight 4 and having a tough time googling this one since I'm not terribly familiar with the terminology involved. Can someone point me in the right direction?
I have an observable collection that I want to represent in an ItemsControl list. The type of the collection is a class that- for simplicity's sake- let's cal...
I am facing a problem with DataBinding in WPF::::
The below code is working:
<TextBox Text="{Binding ProcessStepBlock.ProcessStep[2].ProcessDescription}"></TextBox>
<TextBox Text="{Binding ProcessStepBlock.SelectedIndex}" ></TextBox>
The below code is not working:It gives me a binding error BindingExpression path error: '[ ]' prope...
I havent found quite what I want elsewhere or at least am not accomplished enough to adapt
I'm trying to create a project that shows radio stations with logo, listen button etc
The datasource is an xml file with child tags like 'name','image' and 'listen' for each parent, 'station'.
I access this data via the main application with cre...
If I expose my EF 4 Model objects (EF4 entities) as properties on my ViewModel am I "breaking" MVVM ?
Do I have to duplicate each Model class as some sort of DTO and expose those DTOs from the ViewModel ?
I understand the theoretical value of having the View "not know" about the Model, but the reality is that (if I don't expose the M...