binding

Problem with binding in converter in silverlight custom control

Hi, i got some xaml here and what i m trying to do it's simply bind a property call Property (not the real name) on the width of a rectangle and to convert the value of this property with the converter name Conv and it's working perfectly with {TemplateBinding Property} or DataContext={TemplateBinding Property} or with a relative source ...

Binding Qt to LLVM

What is the best way to create a Qt binding to a language that sits on top of LLVM? Try to parse the Qt header files and generate an interface to C from that, call the C interface from LLVM? Or maybe try to get SWIG to interface Qt? Or is there a better way? ...

WCF - how to create programatically custom binding with binary encoding over HTTP(S)

I'd like to convert my current HTTP/HTTPS WCF binding settings to use binary message encoding and I need to do it in code - not in XML configuration. AFAIK it's necessary to create CustomBinding object and set proper BindingElements, but I'm not able to figure out what elements should I use in my scenario. Main points in my WCF configu...

WPF: How to bind to different objects?

I have a ListBox containing CheckBoxes. Xaml looks like this: <ListBox x:Name="lbContactTypes"> <ListBox.ItemTemplate> <HierarchicalDataTemplate> <CheckBox Content="{Binding Path=Description}" IsChecked="{Binding Path=ContactTypes, Converter={x:Static Classes:ListContainsConverter.Instance}, ConverterParameter=1}...

Javascript prevent anonymous function?

I quite often have to bind? some function that requires arguments. The solution I use is wrapping the function to bind inside an anonymous function. function foo( arg_0 ) { // do stuff with: arg_0 } function bar() { var abc; // stuff happens abc = 'some value'; attachEventHandler(elementId, 'click', function(){foo( abc )...

Binding XML Data in a ListBox

Hi there, I have this piece of code: XmlDocument doc = new XmlDocument(); // Initially value "<ParentNode></ParentNode>" doc = mngr.XmlDoc; XmlDataProvider xmlDP = new XmlDataProvider(); xmlDP.Document = doc; xmlDP.XPath = "/ParentNode/ChildNode"; CollectionViewSource collection = new CollectionViewSource(); collection.Source = xmlDP...

PJSIP and Python problem

I want to do with language python Softphone Application. I used to PJSIP. I tried follow this website http://trac.pjsip.org/repos/wiki/Python_SIP/Build_Install I have been following the installation of Windows. Starting build with minGW. Then any change to build from Visual Studio 2008 and downgrade python from 2.6 to 2.4 according to th...

jQuery, What's Best, Have All the Binds in One Single File For an Entire Site or on a per Page Basis?

I'm in the middle of building a web app with heavy use of jQuery plugins and lots of bindings. The backend was developed with a template system which only allows (as of now) to place all scripts in that one HTML file. We will use YUI compressor to merge all these into one. Now, for bindings, how bad is it to have binds in an HTML file ...

How to refresh ListBox.ItemsSource in a SilverLight 3 project?

I my XAML, I have a ListBox defined <ListBox x:Name="lstStatus" Height="500" Grid.Row="1" Grid.Column="0" Grid.ColumnSpan="3" VerticalAlignment="Top" Margin="2, 2, 2, 2"> <ListBox.ItemTemplate> <DataTemplate> <StackPanel Orientation="Horizontal"> <Image /> <TextBlock Widt...

Android TextViews. Is parametrization possible? Is binding to model possible?

Hello everybody, I am new to both Android and Stack Overflow. I have started developing and Android App and I am wondering two things: 1) Is it possible to parametrize a TextView? Lets say I want to render a text message which states something like: "The user age is 38". Lets suppose that the user age is the result of an algorithm. Usin...

Why my WPF binding not work?

I trying to bind List to Listbox. And at the Button1Click method new instance of MyClass adds in my List<>, but that not visible in my listbox. There my code: public static class NotesEngine { public static List<Note> All; static NotesEngine() { All ...

how to make a jQuery selector work throughout the browser window

Hi i'm using the jQuery mousewheel extension and it uses the following bind $('html').bind('mousewheel', function(event, delta) { window.scrollBy(-120 * delta, 0); return false; }); The delta is determined by the mouse wheel movement and the page scrolls horizontally. All is fine except when you move the cursor on an empty s...

PHP variable assignment

Hello all, I have a question that has me stumped, maybe you can help. I have the following php: if(mysql_num_rows($result) > 0){ //if so set up the xml $dom = new DOMDocument(); $response = $dom->createElement('response'); $encore = $dom->createElement('encoreSongs'); $dom->appendChild($response); $previousDate = ""; ...

WPF: How to select parent listbox if user clicked on child listbox

In my application using DataTemplate mechanism I insert into ListBox item another listbox. But is it possible that when selected one listboxitem in parent listbox, the focus may be on another parent listboxitem's child (see picture) How to do: if one of child listbox in focus (one item from them selected), then parent listboxitem bein...

How do I make a reflection effect in WPF ? (from code)

hi guys, I need to have some mirror objects in WPF. I have a Canvas with some content, and I need 50 visual clones, and if I modify something on the source, it should be updated in these clones. I know it is easy to do in XAML by binding the Visual of a VisualBrush to the element, but can's seem to do this from code. Can anyone help ...

Setting up binding to a custom DependencyProperty inside a WPF user control

I have a WPF UserControl containing a custom DependencyProperty named MyDP. I want to bind this to a property on my ViewModel (which is injected as the UserControl's DataContext). I know one way to do it by setting the binding in the UserControl's declaration in the parent window's XAML as such: <Window x:Class="MyNamespace.Views.Main...

Why would putting a no-op Converter on a Binding change its behavior?

I'm in the midst of testing a user control I've built, and I'm encountering something that's inexplicable to me. The control's an extension of the ComboBox that handles values of a specific custom type. It has a dependency property of that custom type that is the target property of a Binding. I've got a trace statement in the setter...

Property Binding to Static Properties in WPF: Width binding doesn't work

Update: I've corrected the post, so the question is closed. Expected result: Menu width must be equal to the main window width. Here is full code: <Menu Name="menu1" DockPanel.Dock="Top"> <Menu.Width> <Binding Path="MainWindow.Width" Source="{x:Static Application.Current}" UpdateSourceTrigger="P...

[Bind(Exclude="ID")] doesnt work when i declare it as parameter ?

Hi, If i declare the Bind attribute as a parameter on the method, it doesnt work as it expected [AcceptVerbs(HttpVerbs.Post)] public ActionResult Create([Bind(Exclude="ID")]int ServiceId, Event evnt) { var service = dbSrc.GetAll().WithID(ServiceId).SingleOrDefault(); if (service == null) But if...

WPF: Is it possible to call BeginEdit (IEditableObject) automatically when the binding source is updated?

I have a class that implements IEditableObject and now I'm wondering if it's possible to call BeginEdit() automatically when the source of the binding is updated? There are two possible scenarios: Object gets populated via the database. In this case, I don't want to call BeginEdit(). Object gets populated via the input fields by user....