Search Results

Search found 12126 results on 486 pages for 'property hiding'.

Page 20/486 | < Previous Page | 16 17 18 19 20 21 22 23 24 25 26 27  | Next Page >

  • Implementing a Property Inspector/Editor in WPF

    - by Schneider
    So far my plan is to have an event "Item selected" which the property inspector listens to. The actual property inspector is just a ContentControl. When the object is selected the content property is set and the appropriate DataTemplate for editing the object is loaded. In general I am trying to do this "MVVM" style. I guess you could use reflection instead of templating but I only have a handful of types so far. Has anyone implemented something similar? Can you offer any advice or source code?

    Read the article

  • How to add property to property map without class explorer ?

    - by nCdy
    I've got a new question after answer on this question http://stackoverflow.com/questions/2816294/pass-parameter-from-page-to-activex How to add property to property map without class explorer ? Need to add the property for object and class explorer doesn't works because of Nemerle doesn't supports it yet. code : <object id="Bacs_DBTableRepX" classid="CLSID:CA8B72B3-3B15-40D7-9364-478E25AF5B41" codebase="Bacs_DBTableRepX.cab" style=" Z-INDEX: 102; LEFT: 20px; WIDTH: 1200px; POSITION: absolute; TOP: 80px; HEIGHT: 600px"> <param name="ax_Command" value='<%=GetText()%>'/> </object>

    Read the article

  • Objective C -- property lists or text files?

    - by William Jockusch
    I need to import a list of about 40,000 words into my Iphone app. The list will be the same every time the app starts. It seems that property lists and text files are reasonable options. Any reason to prefer one over the other? For reasons I don't understand, finder says the property list on my mac is 1MB, while the text file is only 328K. The property list is an NSMutableArray of NSMutableArrays of NSStrings. The text file is a plain txt file. But amount of time the app takes to start up is also important. If I read in a text file, my app would have to do some simple processing on it each time it starts. Thanks.

    Read the article

  • Can't set default value of string property to "" in the Xcode CoreData model designer

    - by glenc
    I have an entity in my datamodel with a string property that is currently optional, and I'd like to convert this property to a required property with a default value of the empty string. As others have discovered, leaving the default value blank results in validation errors (since the designer interprets this as NULL), but trying '', "", or @"" as the default value results in those literal characters being interpreted as the default, rather than the empty zero-length string, as desired. I did find this thread on Google, however, apart from the solution being really ugly (model definition split between the .xcdatamodel and objc source), it also doesn't work for lightweight migrations because those migrations are done solely based on the .xcdatamodel files and the objc logic from your entity implementations isn't loaded. Is there any way to achieve this in the data model designer?

    Read the article

  • Change LINQ2SQL property in partial class?

    - by Fermin
    Hi, I have a table in my LINQ2SQL diagram with a column called DayOfWeek in table JourneyBooking. The designer.cs has the definition of this as: [Column(Storage="_DayOfWeek", DbType="TinyInt NOT NULL")] public int DayOfWeek { get { return this._DayOfWeek; } set { if ((this._DayOfWeek != value)) { this.OnDayOfWeekChanging(value); this.SendPropertyChanging(); this._DayOfWeek = value; this.SendPropertyChanged("DayOfWeek"); this.OnDayOfWeekChanged(); } } } I have a partial class for the JourneyBooking class. Is it possible to extend/overwrite the above DayOfWeek property with my own property? The issue I am having is that DayOfWeek is 0-6 in C# but 1-7 in SQL, so I was thinking that I could overwrite the DayOfWeek property to subtract or add 1 depending on whether it was a get or set, is this possible or would I need to re-write all of the above code in my partial class?

    Read the article

  • ViewStateMode property in Asp.Net 4.0

    - by AspOnMyNet
    I haven’t yet started learning Asp.Net 4.0, but I did read a bit on ViewState, where there is a new property ViewStateMode. In earlier versions of Asp.Net, if parent control had its ViewState disabled, then child controls also had their ViewState disabled, even if their EnableViewState was set to true. a) Thus if I understand it correctly, then a child control C having ViewStateMode property set to “Enable” causes C to save its view state, even if parent control has its view state disabled? b) Is there a reason why ViewStateMode property hasn’t/couldn’t be implemented in earlier versions of Asp.Net? thanx

    Read the article

  • NHibernate - is property lazy loading possible?

    - by Ben
    I've got some binary data that I store and was going to separate this out into a separate table so it could be lazy loaded. However, i then came across this post by Ayende (http://ayende.com/Blog/archive/2010/01/27/nhibernate-new-feature-lazy-properties.aspx) which suggests that property lazy loading is now possible. I have added the lazy="true" attribute to my property mapping but the field is still loaded from the database (I am using a simple text field to test). My query: return _session.CreateQuery("from Product") .SetMaxResults(1) .UniqueResult<Product>(); Mapping: <property name="Description" type="string" column="FullDescription" lazy="true"/> Has anyone been able to get this working? Personally I prefer this approach than having to add another table to my database.

    Read the article

  • Binding to static property

    - by Anthony Brien
    I'm having a hard time binding a simple static string property to a text box. Here's the class with the static property: public class VersionManager { private static string filterString; public static string FilterString { get { return filterString; } set { filterString = value; } } } In my xaml, I just want to bind this static property to a text box: <TextBox> <TextBox.Text> <Binding Source="{x:Static local:VersionManager.FilterString}"/> </TextBox.Text> </TextBox> Everything compiles, but at run time, I get the following exception: Cannot convert the value in attribute 'Source' to object of type 'System.Windows.Markup.StaticExtension'. Error at object 'System.Windows.Data.Binding' in markup file 'BurnDisk;component/selectversionpagefunction.xaml' Line 57 Position 29. Any idea what I'm doing wrong?

    Read the article

  • @property, setter and getter question?

    - by fuzzygoat
    NSString *statusValue; NSString *currentValue; @property(retain, nonatomic) NSString *statusValue; @property(retain, nonatomic) NSString *currentValue; @synthesize statusValue; @sythnesize currentValue; Given the above, if I am setting one variable to another is it work doing ... [self setStatusValue: currentValue]; or should I use the property again and use [self setStatusValue: [self currentValue]]; I suppose the latter (although maybe overkill) does tell the reader that we are using one of the objects instance variables and not some local variable. just curious really ... gary

    Read the article

  • Google Datastore low-level api query by key property

    - by Keyur
    I'm using the low-level google datastore api and I want to query by the key property and another property (let's call it category). I need to query based on a list of keys for which I'll use the IN operator. I know that the max. number of values you can provide for the IN clause is 30. I have 2 questions: Does the limit of 30 IN values apply to the key property as well? Do I need to create a composite index on {_key_ + category} or just on {category} for this query? Thanks, Keyur

    Read the article

  • WPF, Setting property with single value on multiple subcontrols

    - by Andre van Heerwaarde
    I have a parent contentcontrol which displays data via a datatemplate. The datatemplate contains a stackpanel with several usercontols of the same type. I like to set the property only once on the parent control, it must set the value of the property on all the subcontrols. But if there is a way to do it on the stackpanel it's also OK. The template can be changed at runtime and the values need also to be propagated to the new template. My current solution is to implement the property on both parent and subcontrol and use code to propagate the value from the parent to all the subcontrols. My question is: is there a better or other ways of doing this?

    Read the article

  • WPF MVVM Property Change Animation

    - by cjibo
    I am looking for a clean way to start an animation that will have dynamic values. Basically I want to do an animation where an element changes width based on the data of another element. Say I have a TextBlock that's Text Property is Binding. When this property changes I want a visual element say a Rectangle for our sake to do a DoubleAnimation changing the width from previous value to the new value. I am trying to stay away from putting code in my view if possible. I've looked into DataTriggers but they seem to require that you know what the value would be such as an Enum. In my case it is just the value changing that needs to trigger a storyboard and the animation would need to start at the current(previous) value and move nicely to the new value. Any ideas. Maybe I just missed a property.

    Read the article

  • How to Override a private set property

    - by David
    Hi, Im using the Microsoft.Office.Interop.MSProject.Resource assembly which has a "UniqueID" property, it has a get but not set. How can I actually set a value? An example would be very much appreciated. --Update-- Ok I can get the value for a property "Name" and set, but Im intersted in the "UniqueId" property that does not have a public set (get only): int ii = (int)resource.GetType().InvokeMember("UniqueID", BindingFlags.GetProperty, null, resource, new object[] { }); resource.GetType().InvokeMember("UniqueID", BindingFlags.SetProperty, null, resource, new object[] {iUid,}); I get the following error {"Number of parameters specified does not match the expected number."} anyway for me to work out how many paramters it needs?

    Read the article

  • Pass CSS property dynamically from panelgrid

    - by Bernad Ali
    I have a hidden property which is fetched from ebean. how do i pass that color code property to css function? <h:panelGrid id="testpanel" columns="#{message.no_of_columns}" rows="#{message.no_of_rows}" styleClass="dynamicGrid"> <c:forEach items="#{bLDashBoardAction.listBondLoc}" var="item"> <h:panelGroup> <h:outputText value="#{item.rackTagCode}" /> <h:hiddenInput value="#{item.colorEBean.colorCode};" /> </h:panelGroup> </c:forEach> </h:panelGrid> this is my css property,background need to be assigned from panelgrid colorcode .dynamicGrid td { width: 50px; height: 50px; border: 4px solid gray; background: }

    Read the article

  • Using Property Builtin with GAE Datastore's Model

    - by ejel
    I want to make attributes of GAE Model properties. The reason is for cases like to turn the value into uppercase before storing it. For a plain Python class, I would do something like: Foo(db.Model): def get_attr(self): return self.something def set_attr(self, value): self.something = value.upper() if value != None else None attr = property(get_attr, set_attr) However, GAE Datastore have their own concept of Property class, I looked into the documentation and it seems that I could override get_value_for_datastore(model_instance) to achieve my goal. Nevertheless, I don't know what model_instance is and how to extract the corresponding field from it. Is overriding GAE Property classes the right way to provides getter/setter-like functionality? If so, how to do it? Added: One potential issue of overriding get_value_for_datastore that I think of is it might not get called before the object was put into datastore. Hence getting the attribute before storing the object would yield an incorrect value.

    Read the article

  • BindableAttribute, Combobox, Selectedvalue property - WinForms

    - by user63891
    I am deriving from combobox (WinForms) and am providing a new implementation for the Selectedvalue property. It works fine as is, but any change to the selectedvalue property is not updating other controls bound to the same "binding context" to change their values accordingly. I did try adding the BindableAttribute(true) to the property, but still it does nottrigger the change in value to the other linked controls. The control's DataBindings.add(...) is all set up. And other controls are also bound to the same data filed on the same datasource. Any ideas what i am doing wrong.

    Read the article

  • Raise an event when Property Changed using Reflection

    - by Dante
    I am working in C# and I have an object which I can only access using Reflection (for some personal reasons). So, when I need to set some value to one of its properties I do as below: System.Reflection.PropertyInfo property = this.Parent.GetType().GetProperty("SomeProperty"); object someValue = new object(); // Just for example property.SetValue(this.Parent, someValue, null); And, to get its value I use the method GetValue. My question is: Is there a way to fire an event when the property changes using Reflection? Thank you in advance.

    Read the article

  • Binding Navigation Property with Entity Framework

    - by JSmaga
    Hi, I have another question about binding using C# and the entity framework. Here, I'm looking to bind a navigation property to a listbox or a listview. I saw on different posts that if I update the collection using code behind the list would not be notified because the collection does not handle notification (it's always the same problem anyway). People suggested to use an ObservableCollection for example, but, and here is my question, this comes down to basically duplicate the collection and hence, if I modify it, I'd have to handle in code-behind the fact that the change has also to be applied to the "original" navigation property right? If that's the case, I was thinking: why not create a custom property called, say, MyObservableNavigationProperty in a partial class. I could then interact only with this collection, catch the event when the collection is changed and apply the change to the "original" collection. Is that a nice way to do the trick? or am I getting all confused here....

    Read the article

  • "derivative work" and the consumption of web services

    - by yodaj007
    From the Wowhead Terms of Service: "Intellectual Property Rights The Service and any necessary software used in connection with the Service ("Software") contain proprietary and confidential information that is protected by applicable intellectual property and other laws. You agree not to modify, rent, lease, loan, sell, distribute or create derivative works based on the Service or the Software, in whole or in part." Does this mean that I can't write a program to consume a web service being published by the writers of this TOS? I find it kind of scary that I even have to ask this question. The wikipedia article on "derivative works" isn't very conclusive.

    Read the article

  • Dynamically adding @property in python

    - by rz
    I know that I can dynamically add an instance method to an object by doing something like: import types def my_method(self): # logic of method # ... # instance is some instance of some class instance.my_method = types.MethodType(my_method, instance) Later on I can call instance.my_method() and self will be bound correctly and everything works. Now, my question: how to do the exact same thing to obtain the behavior that decorating the new method with @property would give? I would guess something like: instance.my_method = types.MethodType(my_method, instance) instance.my_method = property(instance.my_method) But, doing that instance.my_method returns a property object.

    Read the article

  • Extracting property names from a c# source file

    - by Pete
    I want to parse a c# file. The only thing I want is to determine if it contains a property with a specific name; just a simple true/false response. Or rather, since I'd checking for more than one property in each run, extracting a list of property names could be helpful I thought that I could create an elegant solution using the CodeDomProvider functionality (f# example): use reader = new StreamReader(existingFile) let codeProvider = new CSharpCodeProvider() let codeUnit = codeProvider.Parse(reader) Unfortunately, the Parse function is not implemented for the CSharpCodeProvider. Is there a way to get a CodeCompileUnit from a source file? Or is there another elegant way? (I had hoped to avoid regular expressions on this)?

    Read the article

  • UITableView - iPad - Property '' Not Found on Object of type UITableViewCell

    - by user1797508
    I have added a UITableView prototype Cell into a UIView for an iPad application using StoryBoard in Xcode (targeting iOS6). The problem I'm having is that the labels are not being recognized in my viewController when I try to reference them. In my implementation, I have: - (void)tableView:(UITableView *)tableView didSelectRowAtIndexPath:(NSIndexPath *)indexPath { static NSString *CellIdentifier = @"dashboardMessage"; UITableViewCell *cell = [_tableView dequeueReusableCellWithIdentifier:CellIdentifier]; if (cell == nil) { cell = [[UITableViewCell alloc] initWithStyle:UITableViewCellStyleDefault reuseIdentifier:CellIdentifier]; } int row = [indexPath row]; cell.messageSender.text = [_matches valueForKey:@"from"]; } The last line is causing an error: Property 'messageSender' Not Found on Object of type UITableViewCell In the cell's header file I have: @interface DashboardMessageCell : UITableViewCell @property (strong, nonatomic) IBOutlet UILabel *messageSender; @property (strong, nonatomic) IBOutlet UILabel *messageDescr; and the header file is imported into the viewController. I'm lost as to what can be causing the issue, any help would be greatly appreciated. Thanks.

    Read the article

  • Remove C# attribute of a property dynamically

    - by SysAdmin
    Hi, I have a class with a set of properties As given below. class ContactInfo { [ReadOnly(true)] [Category("Contact Info")] public string Mobile { get; set; } [Category("Contact Info")] public string Name{ get; set; } } The objects of this class is being assigned to a property grid, so that the users can update an existing contact. you can see that Mobile is marked as ReadOnly. But, when I want to add an entirely new Contact, I would want the users to be able to edit the contact Mobile also. For that I need to remove the Readonly property dynamically from the Type, before assigning the object to the property grid. Is it possible?

    Read the article

  • asp.net checkbox in gridview - checked property is missing

    - by Peter PitLock
    In this asp.net gridview control, the checked property is always missing. I need to access the checked property via jquery Gridview source: <Columns> <asp:TemplateField> <ItemTemplate> <asp:CheckBox ID="chkSelected" runat="server" class="chkSummarySelection" /> </ItemTemplate> </asp:TemplateField> </Columns> Renders as : <input type="checkbox" name="ctl00$ContentPlaceHolder1$gv$ctl02$SelectedCheckBox" id="ctl00_ContentPlaceHolder1_gv_ctl02_SelectedCheckBox"> There is no checked property to access. I have tried $(".chkSummarySelection").click(function () { var chk; chk = $(this).prop("checked"); chk = $(this).attr("checked"); chk = $(this).is(":checked"); chk = $(this).attr("value"); chk = $(this).val(); chk = jQuery(this).is(':checked'); }); but nothing is working

    Read the article

  • Why does this binding doesn't work through XAML but does by code ?

    - by user361899
    I am trying to bind to a static property on a static class, this property contains settings that are deserialized from a file. It never works with the following XAML : <Window.Resources> <ObjectDataProvider x:Key="wrapper" ObjectType="{x:Type Application:Wrapper}"/> </Window.Resources> <ScrollViewer x:Name="scrollViewer" ScrollViewer.VerticalScrollBarVisibility="Auto"DataContext="{Binding Source={StaticResource wrapper}, UpdateSourceTrigger=PropertyChanged}"> <ComboBox x:Name="comboboxThemes" SelectedIndex="0" SelectionChanged="ComboBoxThemesSelectionChanged" Grid.Column="1" Grid.Row="8" Margin="4,3" ItemsSource="{Binding Settings.Themes, Mode=OneWay}" SelectedValue="{Binding Settings.LastTheme, Mode=TwoWay}" /> It does work by code however : comboboxThemes.ItemsSource = Settings.Themes; Any idea ? Thank you :-)

    Read the article

< Previous Page | 16 17 18 19 20 21 22 23 24 25 26 27  | Next Page >