Here is the code for App.xaml:
<!-- <XmlDataProvider x:Key="BookmarkData" Source="testData.xml" XPath="/Favourites"/>-->
<XmlDataProvider x:Key="BookmarkData" XPath="/Favorites">
<x:XData>
<Favorites>
<Bookmark>
<Title>Google</Title>
<URL>http://www.google.com</URL>
...
Hi all!
After a lot of searching, I have not found any solution for the following problem.
I need a treeview control with "checkboxed" treeview items and the CheckedItems property for convenient data binding (for example, tree view of folders' structure, when user checks folders, the size of checked folders is displayed in a textbox).
B...
Hey,
I just started writing a customer application in C#, using Visual Studio design mode for most of it. Bear in mind I only started learning C# yesterday - so if I am making any stupid mistakes then please say so.
What I have so far
A database;
A DataSet which links to the Customer and Agent tables;
A BindingSource which binds to t...
One common scenario we run into is with a drop down being databound inside the edit template of a ListView. This usually works pretty well, but I cannot figure out a good way to handle exceptions, for example, look at this error from our website:
Server Error in '/' Application.
'ddlLender' has a SelectedValue which is invalid because...
I was looking at this question and it gave me about 80% of what I needed. The "problem" for me is that my XML is strucutred differently and I am not quite sure how I would go about using Linq to get at what I need.
My XML looks like this (By the way, its generated by the ConvertTo-XMl PowerShell Cmdlet)
<?xml version="1.0"?>
<Objects>
...
public partial class Form1 : Form
{
MyClass myClass = new MyClass("one", "two");
public Form1()
{
InitializeComponent();
textBox1.DataBindings.Add("Text", myClass, "Text1", false, DataSourceUpdateMode.Never);
textBox2.DataBindings.Add("Text", myClass, "Text2", false, DataSourceUpdateMode.Never);
}...
This is a question on edit form UI for a WP7 app:
I currently have my edit form fields set to 2-way binding which means that as the user changes them they save on edit and update the UI in the ViewModel (Method 1). So I don't need a Save button and there is no Cancel button (unless you code in logic to store the original state and roll...
I am using Blend 4. I am having a list item which i am binding to sample dataset VM using this approach, which works fine. The issue is with the IValueConverter applied to binding. Blend doesn't seem to process the converter in design time UI. Is it possible for Blend to process data using converters in design time?
...
The example of this would be:
A textBox is bound to some data. There is a second text box which is not bind to anything. So I want to bind text box 2 to the same data 1st textBox is bound.
In other words I wan't to know if the DependencyObject stores some reference to it's data-bindings? If not, what is the way to find out all data-bin...
Note: See the bottom of this post for the solution.
I'm trying to use XAML's "HierarchicalDataTemplate" to display an xml document in a TreeView.
My current XAML code will display the first child of the "Parent" node but not subsequent child nodes of different types.
Can I use XAML to display children of different types under a common...
Hello, I am experimenting with WPF and I came across a problem I can't seem to figure out although I have done some work with Silverlight previously and used DataContexts, Data Bindings and INPC successfully. This time I am stuck...
I am using this code to create an instance of the application's main window:
protected override void OnS...
if i have a Repeater bound to a SPDataSource and within the repeaters template another Repeater and SPDataSource. How do I pass a parameter from the outer SPDataSource to the inner?
<div class="menu-container">
<sharepoint:spdatasource id="SPDataSourceCategories" runat="server" datasourcemode="List"
useinternalname="true" ...
I am constantly in search of better and faster java tools to prototype webapps. I generally start with a good data model on the backend, and work towards the screens. What are some good tools that I might not know about that can be used to quickly generate functioning CRUD screens.
...
I am little confused about how to create Master Detail view with two different user controls.
There are three choices,
Choice 1
CustomerMasterView + CustomerMasterViewModel
CustomerDetailView + CustomerDetailViewModel
And keep both View Models in App.Resources
But by doing this, binding becomes complex with all static resources sou...
Using WCF i get data from server. Data contains Folders and these folders contain queries. I need to set folder icon(expanded collapsed) on the folder node and another icon on query.
TreeView is bound to this collection using HierarchicalDataTemplate. I tryed to do it with converter but failed. I also want it to be MVVM compliant.
<sdk:...
I'm using the Silverlight DatePicker and TimePicker from the toolkit together to allow a user to select a date and time. They are bound to the same DateTime value on a business object behind the scences. This mostly works okay, except when the date component is changed the time component is wiped. This is kinda logical but probably not t...
I need to know how to display the result of a select query in a datagrid or GridView with VB.NET?
Consider SELECT * FROM some_table. I don't know what columns the table has. Is there a way to just output the result to a table, with a dataset for example?
How can this be done easily?
...
I have a WPF (.Net 4) ListView used to navigate a local Windows directory. It displays the contents of the current directory, with name and size and all that. However, in some directories, the first element it displays shows up twice. For example, let's say in directory "D1" I have subdirectories "W", "X", "Y", and "Z". The ListView will...
Say I have XAML like
<TabControl Grid.Row="1" Grid.Column="2" ItemsSource="{Binding Tabs}" IsSynchronizedWithCurrentItem="True">
<TabControl.ItemTemplate>
<DataTemplate>
<TextBlock Text="{Binding TabTitle}" />
</DataTemplate>
</TabControl.ItemTemplate>
<TabControl.ContentTemplate>
<DataTem...
I have 3 controls on my page
ListBox A
ListBox B
ComboBox C
ListBox A is databound to a collection of items A
ComboBox C is databound to a collection of items C
ListBox B is databound to a collection of items B
B has a reference to Item A and Item C, the ListBox B should only show the items where Item A is the selected item of Li...