|
Hi, I have a data navigation user control in Silverlight which opens a child window where the user can enter search criteria and when they press 'Apply' it's suppose to update the bound property in the ViewModel (MVVM pattern.)
The links are: SearchDialog...
Started by Nick Gotch on
, 3 posts
by 3 people.
Answer Snippets (Read the full thread at stackoverflow):
Since you're already using some of Nikhil's stuff, you might want to take a look));
And then hooked up the Navigator's... .
Not sure if that Binding property in the middle will work since you're trying to bind it to a property of type string.
|
|
I have a custom control with a TextBlock inside it:
<Style TargetType="{x:Type local:CustControl}"> <Setter Property="Template"> <Setter.Value> <ControlTemplate TargetType="{x:Type local:CustControl}"> <Border Background="Blue...
Started by rem on
, 3 posts
by 3 people.
Answer Snippets (Read the full thread at stackoverflow):
Ie:
{Binding Path=CustNo, RelativeSource={RelativeSource TemplatedParent}}
You need a TemplateBinding, like
<TextBlock Text="{Binding RelativeSource={RelativeSource TemplatedParent... .
I think you'll want the third example.
Try the answers to this SO question.
|
|
In WinForms, I could add a [Category] attribute to a custom control property to specify which property category should contain the property. How do I do that in WPF? Thanks
Started by David Veeneman on
, 3 posts
by 3 people.
Answer Snippets (Read the full thread at stackoverflow):
Don't have to include a design-time DLL to add a [Category] attribute to a custom control property.
|
Ask your Facebook Friends
|
I'm trying to make a custom property for a WebPart. The custom property should be a drop down with choices coming from a "choice" column from a content type. Is that even possible?
Started by mrmuggles on
, 3 posts
by 3 people.
Answer Snippets (Read the full thread at stackoverflow):
SP will the automatically generate an EditorPart where you can code the UI for handling entry of the custom property
You cannot data bind directly and code....
With these values and use that as datatype for your custom property.
|
|
I am creating a custom MaskedTextBox for Date only. Now i want to hide Mask property of MaskedTextBox from its users.
EDIT:
public class CustomDateMask:System.Windows.Forms.MaskedTextBox { public new string Mask { get; private set; } public CustomDateMask...
Started by Shantanu Gupta on
, 4 posts
by 4 people.
Answer Snippets (Read the full thread at stackoverflow):
Error Details:
Error 1 The property or indexer 'ScratchPad.Test.Text' cannot be used in this context { return base.Mask; } set { base.Mask = value; } }
The [Browsable] attribute hides the property.
|
|
I need to add a custom property to an Entity Framework class, however when I do I get the "The property name XXX specified for type XXX is not valid." error. Is there some attribute I can give the property so it is ignored and not mapped to anything?
...
Started by Sprintstar on
, 3 posts
by 3 people.
Answer Snippets (Read the full thread at stackoverflow):
You can add a property in code:
public partial class MyEntity { public String MyCustomProperty.
|
|
I've created a program that creates and populates a custom document property in an Excel 2007 workbook file. However I haven't been able to show the value of this property in a worksheet cell. In Word 2007 you can just select "Insert -> Quick Parts...
Started by LeonZandman on
, 4 posts
by 4 people.
Answer Snippets (Read the full thread at stackoverflow):
You can link a named range to a custom property, but then the custom....
If you update the custom in the document properties.
Dependencies only relate to other cells; this formula depends on a custom property.
|
|
In Delphi 2007, I added a new string type to my project:
type String40 = string;
This property is used in a class:
type TPerson = class private FFirstName = String40; published FirstName: string40 read FFirstName write FFirstName; end;
During runtime,...
Started by birger on
, 3 posts
by 3 people.
Answer Snippets (Read the full thread at stackoverflow):
Make the Firstname property published
Edit: what happens if you compile and run this piece of code; TPerson = class(TPersistent) private FFirstName: String40; published property FirstName: string40 read two things:
Make the property....
|
|
During a code review I looked at set of repository classes (in vb.net). I am used to seeing these repository classes full of functions that return collections (among other things) of your domain objects. However, this repository had 1 public property ...
Started by EricCode on
, 4 posts
by 4 people.
Answer Snippets (Read the full thread at stackoverflow):
Obtaining a property value using the get accessor would have an observable side ....
According to the MSDN Property Usage to the user that they should consider caching the result.
In the setter that accesses any kind of DAL is bad practice .
|
|
I have a custom collection, lets says COL, that derives from ObjectModel.Collection.
I have my own collection editor that works fine when a property, of type COL, is Read and Write enabled. However, if I change the property to ReadOnly, the open editor...
Started by Jules on
, 3 posts
by 3 people.
Answer Snippets (Read the full thread at stackoverflow):
A modal editor is more to edit a value (usually a reference type) and therefore can be used even ... .
As such the property must not be readonly.
Is a new value for the property (see ColorEditor, AnchorEditor, DockEditor, CursorEditor, ...).
|