Working with the MVVM pattern, I have a pair of view model classes that represent a two-tier data hierarchy, each with a corresponding UserControl that represents its view. Both view model classes implement INotifyPropertyChanged and the root level view model exposes a property that is relevant to both its own view and the child view.
T...
Ruby's eval() can be like
def showblock(&block)
puts eval("i * 3", block)
end
where block is the block passed into the function.
Instead of a block, a binding object can be passed in as well. Is the binding object the same as what is called the "scope chain" that is mentioned a lot when Javascript closure is discussed?
...
I'm new to DataBinding but would like to accomplish the following:
I have a ViewModel which has a collection of objects: CollectionOfStuff
Each object Stuff has some properties: Name, Value.
In my View, I have a StackPanel with some TextBlocks. I would like to bind the TextBlock's Text property to a specific property. ( I would like t...
Hey guys,
I would like to map my "WASD" to the arrows.
I don't like moving my hands around. I already fixed it for my editor by calling W for arrowUp.
But, how can I bind it for the entire system?
When I call W, I want it to call the arrow UP.
I can't bind those keys one software at the time.
Any ideas?
Thanks.
-hbt
...
I have an ItemsControl that displays a bunch rectangles. Each rectangle needs to be offset upward and to the left. So, I created a RectangleStyle that uses bindings to set the width, height, X translation, and Y translation for a rectangle.
The width and height bindings are working fine, but I'm getting the following error for the Tran...
I'm using AvalonDock to layout my application.
I want to create a "View" MenuItem with a checkable MenuItem for each of my DockableContents that will show/hide each item.
I'm not finding an example of anyone doing this, and it appears to me the State property is readonly, making it not possible to create a 2-way binding to the MenuItem...
I would like to implement a virtual filesystem using FUSE under Linux and Mac OS X. I have mainly worked in Java and .NET/C#, but also familiar with Python and do write small utilities/shell scripts in Python. Writing is C/C++ is something that I would try to avoid if possible mainly because of lack of experience in the team.
I see from...
Hi,
I have a WPF application which has a main window composed from several custom UserControls placed in AvalonDock containers.
I want some of the UserControls' functionality to be accessible from a toolbar and menubar in the main window. I have a command defined as this in the control like this:
public ICommand UnfoldAllCommand
...
I needed to build a custom treeview as a user control. I called it for the sake of the example TreeViewEx :
<UserControl x:Class="WpfApplication4.TreeViewEx"
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
x:Name="root">
<...
It would be good to have ability to raise 'PropertyChanged' event without explicit specifying the name of changed property. I would like to do something like this:
public string MyString
{
get { return _myString; }
set
{
ChangePropertyAndNotify<string>(val=>_myString=val, value);
}
...
Hello I have a problem with binding commands to button inside datagrid.
Here should be explanation but it doesn't explain everything.
http://msdn.microsoft.com/en-us/library/dd458928.aspx
What should be in classes in namespace Infrastructure?
Can somebody show me a really basic sample of using this?
not just parts of the code...
...
hi - i binded a datatable to a datagridview datasource. Now the problem is the columns in my datagridview cannot be customized. Does anyone know how to do this? It seems that the columns are dynamically created from the datasource. I need to custom to the font, color column names, etc... any thoughts?
...
Hello all,
I've been using Castor these past couple of days to try to get a little serialization going between my Java program and XML in a readable way. Though it has a few faults, Castor's automatic xml generation via reflection is actually very functional. Unfortunately, one thing that seems to be fairly well left out of the exampl...
Hi All,
In my SL4 application, I have a Class called Images which has two properties (ImagePath, ImageName) and a method getImages() which retruns ObservableCollection list of all Images.
I need to create a Resource on my Page so that when a DataTemplate is loaded dynamically it can have access to the Images in one of its ComboBox field....
My XAML is as follows
<Button.IsEnabled >
<MultiBinding Converter="{StaticResource IsEnabledConverter}" >
<Binding Path="aaa"/>
<Binding Path="bbb"/>
<Binding Path="ccc"/>
<Binding Path="ddd"/>
<Binding Path="eee"/>
<Binding Path="fff"/>
<Binding Path="ggg"/>
<Binding P...
I am building a simple photo gallery application which shows images in a listbox. The xaml is:
<ListBox x:Name="imageList" Margin="10,10" ItemsSource="{Binding}" Height="500">
<ListBox.ItemTemplate>
<DataTemplate>
<StackPanel Orientation="Horizontal">
<TextBlock Text="{Binding}" Ho...
I am trying to access Control using ElementName from DataTemplate that is used in different UserControl (Resources) than defined (in xaml).
Imagine this situation:
MyUserControl.xaml with following DataTemplate in resources:
<UserControl.Resources>
<DataTemplate x:Key="SomeTemplate">
<TextBlock Text="{Binding Text, ElementNam...
Consider this (using apsw here):
s = ["A", "B", "C"]
c.execute("SELECT foo.y FROM foo WHERE foo.x in (?)", (s, ))
This doesn't work, because a binding parameter cannot be a list. I want to bind a list of strings to ?. I know how to build the appropriate query-string manually, but I wonder if there is a way to do this with bindings.
...
I'm trying to implement a binding between some custom-built models and just beginning to dabble with the whole mx.binding.* collection. I tried this simple, stripped down example, but can't get the binding working correctly. Can somebody tell me where I'm going wrong?
// Model
package
{
import flash.events.EventDispatcher;
public c...
I am new to both Haskell and programming. My question about binding in pattern-matched, recursive functions. For instance, suppose I have a function which checks whether a given list (x:xs) is a sublist of another list, (y:ys). My initial thought, following the examples in my textbook, was:
sublist [] ys = True
sublist xs [] = False
sub...