binding

Azure function, flexible test and production queue names

感情迁移 提交于 2019-12-23 03:45:16
问题 How can I design my Azure Function hosting for flexible test/production queue isolation? I am planning to write 6 precompiled Azure Functions in C# packaged as single DLL and have yet to to decide if I will use WebJobSdk function annotation or multiple .json config files. My 6 Azure functions will only have input bindings and all will be triggered via storage queues. I dislike the idea of hardcoding queue names in source code as method attribute strings but I understand that INameResolver

Binding a List to Repeater in WinForm application

穿精又带淫゛_ 提交于 2019-12-23 03:23:17
问题 I recently started this question. The suggested approach was to use a DataRepeater . I've seen a lot of examples on how to bind the repeater, but all of them were for ASP, not Windows Form applications. I have added Label , PictureBox and Button components to the template, but I've not been able to successfully bind my IList<SomeObject> to my DataRepeater . I'd like to populate those components with information from a list. How to bind a IList<SomeObject> to a DatarRepeater in WinForm

Wpf Binding a TextBlock to App Property's member

我与影子孤独终老i 提交于 2019-12-23 03:10:06
问题 In my WPF app, I want an object "CaseDetails" to be used globally i.e. by all windows & user controls. CaseDetails implements INotifyPropertyChanged, and has a property CaseName. public class CaseDetails : INotifyPropertyChanged { private string caseName, path, outputPath, inputPath; public CaseDetails() { } public string CaseName { get { return caseName; } set { if (caseName != value) { caseName = value; SetPaths(); OnPropertyChanged("CaseName"); } } } protected virtual void

How to apply formatting string when binding DateTime to MaskedTextBox?

淺唱寂寞╮ 提交于 2019-12-23 02:48:10
问题 I have a MaskedTextBox using the mask "00/00/\2\000" to restrict input to a format of XX/XX/20XX , with the Text property bound to MyBindingSource.SomeProperty of type DateTime . Recently, values with a single-digit month or day recently started displaying incorrectly. I expect that the ToString() method is being called on the value at some point in data binding, and I believe the call is not padding month / day with zeroes. I tried setting the format type of the MaskedTextBox.Text property

Binding without XAML [WPF]

假如想象 提交于 2019-12-23 02:19:17
问题 I am designing an application with 256 buttons inside, and I am adding them in the WrapPanel in C# code using for loop. These buttons are not mentioned in XAML code. My problem is that, when clicking on one of them, I have to change its color using binding. I tried following code, but it does not work (only changes the content of the button): private void NewButton_Click(object sender, RoutedEventArgs e) { Button btn = (Button)sender; for (int i = 0; i < counter; i++) { if (btn.Name == ("Butt

How to read object type hosted by bindingSource [duplicate]

若如初见. 提交于 2019-12-23 02:18:45
问题 This question already has an answer here : How to read BindType prop from BindingSource? (1 answer) Closed 5 years ago . EDIT: I changed wording, added long sample code to be more descriptive I need to read type name of object bind via BindingSource. My method accepts BindingSource as parameter and it doesnt know about object type 'hosted' by BindingSource. But I need to read that object type To explain better what I meant, assume I have 2 classes class Person { public string Name { get; set;

Python C binding error

回眸只為那壹抹淺笑 提交于 2019-12-23 02:02:15
问题 I have written a Python API in C code and saved the file as foo.c. Code: #include <Python.h> #include <stdio.h> static PyObject *foo_add(PyObject *self, PyObject *args) { int a; int b; if (!PyArg_ParseTuple(args, "ii", &a, &b)) { return NULL; } return Py_BuildValue("i", a + b); } static PyMethodDef foo_methods[] = { { "add", (PyCFunction)foo_add, METH_VARARGS, NULL }, { NULL, NULL, 0, NULL } }; PyMODINIT_FUNC initfoo() { Py_InitModule3("foo", foo_methods, "My first extension module."); } When

Python C binding error

让人想犯罪 __ 提交于 2019-12-23 02:02:13
问题 I have written a Python API in C code and saved the file as foo.c. Code: #include <Python.h> #include <stdio.h> static PyObject *foo_add(PyObject *self, PyObject *args) { int a; int b; if (!PyArg_ParseTuple(args, "ii", &a, &b)) { return NULL; } return Py_BuildValue("i", a + b); } static PyMethodDef foo_methods[] = { { "add", (PyCFunction)foo_add, METH_VARARGS, NULL }, { NULL, NULL, 0, NULL } }; PyMODINIT_FUNC initfoo() { Py_InitModule3("foo", foo_methods, "My first extension module."); } When

How to setup a ViewModel binding for a TextBox with ReactiveUI?

非 Y 不嫁゛ 提交于 2019-12-23 01:54:55
问题 For some reason I can't get my textbox/property binding to work "automatically" with Reactive UI. My DataContext is setup like this: My ViewModel is setup in the code behind for the MainWindow.xaml.cs: public MainWindowViewModel ViewModel { get; protected set; } public MainWindow() { ViewModel = new MainWindowViewModel(); } In my WPF MainWindow.xaml I have the DataContext and the have a textbox element like this: (Other properties ommitted) <Window x:Name="Window"> <Grid DataContext="{Binding

Using XAML binding how can I visually alert users that a tab contains data (in child controls)?

限于喜欢 提交于 2019-12-23 01:49:15
问题 My WPF TabControl contains multiple TabItems. I want to visually alert users that data exists on a tab . Currently users have to click each tab to be sure nothing important was overlooked. Each tab represents a step (with instructions) of a multi-step workflow. Each workflow contains a random combination of steps (some steps may be skipped). I'd like tabs to change color or otherwise make it clear that one or more of it's child controls contain instructions. What binding syntax could I add to