Greetings to all and sorry for my English!
I have a ListBox, it's ItemsSource = myClientsList.DefaultView. The Items of ListBox have a template (ControlTemplate), that is defined in a in a separate resource file.
Every Item contains a little TextBlock's, Text -property of each have a binding to fields of my Object myClientsList.
I need ...
Hi,
I'm looking for a solution how to manualy call Update method on a SqlDataSource connected to a DetailsView. The problem is that if I call the Update method from a button.onclick event nothing happens. So I checked the parameters value in the Updating event of the sqldatasource and they are all null. I don't wan't to use a Command but...
I have this problem, I've got Silverlight app written using MVVM. I need to create DataForm which is binded to property on ViewModel and I want to add ComboBox and fill it with values from other collection in the same ViewModel.
Code:
<dataFormToolkit:DataForm CurrentItem="{Binding NewUser, Mode=TwoWay}" AutoGenerateFields="False" Heig...
I have a ListBox that I have added a context menu to. I want one of the items in the context menu to be bound to a command and I want the parameter passed to that command to be the currently selected item of the ListBox control. Here's my xaml:
<ListBox
x:Name="selectedVascularBeds"
Ite...
Hello
I have a view model to manage a dialog type of view that allows filtering of a listing (if necessary) and selection of an item. The code works fine whether I set IsSynchronizedWithCurrentItem to true or not. My understanding is that this property is not true by default in a ListView, so I'd like to better understand this property....
<% foreach(Data.Abzac abzac in GetAbzaci()){ %>
<abz:Paragraph runat="server" ID="ctrlParagraph" Abzac='<%= abzac %>' />
<% } %>
Is this possible in some similar way, without DataBinding and reapeating controls?
...
I have an Object who's internal representation is not conducive to data entry. I have a class with multiple custom components, one of which is a Range class. The Range class is easiest to input using two text field inputs rather than as one text field that uses a custom PropertyEditor.
I have a fully functional constructor that could ...
Work on asp.net vs 05 C#.
I read many books on use of treeviews and they all display sitemaps.
However I want it to display my own database for other purpose - eg supervisor-sunordinates/reports relation.
Suppose my database is like this
Supervisor,Staff
===============
Peter, Mary
Peter, Tom
Winnie, Victor
etc
if exists (select * f...
Hi!
I have ListBox data bind to list of users (collection):
usersListBox.DataSource = null;
usersListBox.DataSource = _users;
usersListBox.DisplayMember = "Name";
usersListBox.ValueMember = "Id";
Now I want properties of selected item to be shown in different text boxes, so I do the binding:
nameTextBox.DataBindings...
Hello, i have a lot of some WPF windows. On them i write some code, which binds UI controls and data, something like this:
public class AddressWindow
{
public string AddressID { get; set; }
public string Addr1 { get; set; }
public string Addr2 { get; set; }
public string ZIP { get; set; }
...
Hi,
I am trying to display a tooltip for an item generated by an ItemsControl that needs to pull data from conceptually unrelated sources. For example, say I have an Item class as follows:
public class Item
{
public string ItemDescription { get; set; }
public string ItemName { get; set; }
}
I can display the Item within an It...
Say I have a label inside a gridview template column and I assign the text to the databound item, "OrderID". Is there any way I can call .ToString().PadLeft(7, '0') ? Here's the label as it stands:
<asp:Label ID="lblOrderID" runat="server" Text='<%# "WW" + DataBinder.Eval(Container.DataItem, "OrderID") %>' />
Because PadLeft requir...
Hi
I thought Eval("JobTitle") converts returned value to type String, but that doesn’t seem to be the case, since value (returned by Eval("JobTitle")) passed to GetSelectedJobTitle() was of type Object and not String, which caused an error saying “cannot convert from object to string”.
<EditItemTemplate>
<asp:DropDownList ID="Ed...
Hi
If user selects another item in ddlJobs, then I assume for Bind() to be able to retrieve the newly selected value, SelectedIndexChangedEvent needs to be fired before Bind() tries to retrieve the value of ddlJobs.SelectedValue property?
So when exactly does Bind() retrieve a value from binded property? Moments before the updating ...
How can the whitespace at the start and end of the content of an XML element be removed when binding to the element using XPath in WPF?
...
Can an object created in the code (ie C#) be used for binding in the XAML?
For example:
public class MyForm
{
private MyComplexObject complexObject;
public MyForm()
{
InitializeComponent();
}
public OnButtonClick(object sender, RoutedEventArgs e)
{
complexObject = new MyComplexObject();
}
}...
I have a row in excel I'd like to translate into an ObserveableCollection in C# for binding/event purposes, so all accessor classes know they're getting the latest data from the source excel sheet. How would this be done?
Clarification: I'm using an excel add-in project, not a workbook project, so am not sure whether or not XMLMappedRan...
Hey
I have an Ellipse defined as so
<Ellipse Stroke="#FF474747" Style="{StaticResource SelectedTemplate}" Fill="{StaticResource RedGradient}" />
I also have two styles setup like so
<RadialGradientBrush x:Key="RedGradient" GradientOrigin="1,1">
<GradientStop Color="White"/>
<GradientStop Color="Red" Offset="1"/>
</RadialGrad...
I see several people saying that WPF can use "Custom Type Descriptors" for "Change notification".
The ways I know how to do Change Notification are:
object.GetBindingExpression(Bound.property).UpdateTarget();
Or have my object implement INotifiyPropertyChanged.
I see comments saying that Custom Type Descriptors will work too, but no...
Hello,
I have a textbox I want to bind to DateTime property to an object :
myTextBox.DataBindings.Add("Text",myObject,"DateTimeProperty")
myTextBox.DataBindings["Text"].FormatString = "HH:mm";
myTextBox.DataBindings["Text"].FormattingEnabled = true;
myTextBox.DataBindings["Text"].BindingComplete +=
delegate(object sender, B...