Search Results

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

Page 14/486 | < Previous Page | 10 11 12 13 14 15 16 17 18 19 20 21  | Next Page >

  • Entity Framework 4 Hiding Underlying Resolver Tables when model is generated from database

    - by grrrrrrrrrrrrr
    When creating an entity framework model from scratch it is possible to specify a Many to Many relationship in the model. e.g Entity1 * ----- * Entity2 When a database is then generated from this, a resolver table is then created automatically between the two entities, this is hidden in the code model, allowing direct access to each of the entities via properties. e.g. Entity1 ----* ResolverEntity *----- Entity2 My question is, when a model is generated from an existing database, which contains resolver tables, is it possible to create the same effect so the resolver tables do not appear in the generated object model? When I have attempted this, the entity framework appears to create entities in the model for the resolver tables with no obvious way of hiding them in the object model. Thanks.

    Read the article

  • Hiding a Bar button item in the view

    - by devb0yax
    How can you able to hide the (done) bar button item in a view? Basically, I have a view controller added with navigation bar (in IB) then, I also added a bar button item into the nav bar. I just want initially the (done) bar button item is hidden.. when input is in the text view the (done) button is already visible. Any idea on this implementation on a view controller? Here's my sample code: @interface MyTextViewViewController : UIViewController <UITextViewDelegate> { UITextView *m_textView; UIBarButtonItem *doneBarButtonItem; } @property(nonatomic,retain) IBOutlet UITextView *m_textView; @property(nonatomic,retain) IBOutlet UIBarButtonItem *doneBarButtonItem; - (IBAction)saveAction:(id)sender; .m file: - (void)viewDidLoad { [super viewDidLoad]; doneBarButtonItem.hidden = YES; --> compile error!!! } - (void)textViewDidBeginEditing:(UITextView *)textView { doneBarButtonItem.hidden = NO; --> compile error!!! } - (IBAction)saveAction:(id)sender { doneBarButtonItem.hidden = YES; --> compile error!!! ... }

    Read the article

  • jQuery hiding a div on click outside

    - by Lee
    Hi All I would like to build a simple menu for each list element clicked on but hide this div once you click outside it. Here is some simple code which hopefully will make sense. $('.drillFolder').click(function(){ var id = $(this).attr('data-folder'); $(".drillDownFolder ul li > a").attr('data-id', id); $(".drillDownFolder").show(); }); $("body").click(function(e){ if(e.target.className !== "drillDownFolder") { $(".drillDownFolder").hide(); } }); //The hidden div <div class="drillDownFolder" style="display:none"> <ul> <li><a href="#" data-id="">Show Image</a></li> <li><a href="#" data-id="">Edit Image</a></li> </ul> </div> I know whats wrong as the menu is show via the .drillFolder links the body click is then hiding it straight away. How can I avoid this. Thank you if you can advise

    Read the article

  • Animating a custom property of CALayer subclass

    - by jemmons
    I have a CALayer subclass, MyLayer, that has a NSInteger property called myInt. I'd really like to animate this property via CABasicAnimation, but it seems CABasicAnimation only works on so-called "animatable" properties (bounds, position, etc). Is there something I can override to make my custom myInt property animatable?

    Read the article

  • Getting the CVE ID Property of an update from WSUS API via Powershell

    - by thebitsandthebytes
    I am writing a script in Powershell to get the update information from each computer and correlate the information with another System which identifies updates by CVE ID. I have discovered that there is a "CVEIDs" property for an update in WSUS, which is documented in MSDN, but I have no idea how to access the property. Retrieving the CVE ID from WSUS is the key to this script, so I am hoping someone out there can help! Here is the property that I am having difficulty accessing: IUpdate2::CveIDs Property - http://msdn.microsoft.com/en-us/library/aa386102(VS.85).aspx According to this, the IUnknown::QueryInterface method is needed to interface IUpdate2 -  "http://msdn.microsoft.com/en-us/library/ee917057(PROT.10).aspx" "An IUpdate instance can be retrieved by calling the IUpdateCollection::Item (opnum 8) (section 3.22.4.1) method.  The client can use the IUnknown::QueryInterface method to then obtain an IUpdate2, IUpdate3, IUpdate4, or IUpdate5 interface. Additionally, if the update is a driver, the client can use the IUnknown::QueryInterface method to obtain an IWindowsDriverUpdate, IWindowsDriverUpdate2, IWindowsDriverUpdate3, IWindowsDriverUpdate4, or IWindowsDriverUpdate5 interface. " Here is a skeleton of my code: [System.Reflection.Assembly]::LoadWithPartialName("Microsoft.UpdateServices.Administration") | Out-Null  if (!$wsus)  {  Returns an object that implements IUpdateServer  $wsus = [Microsoft.UpdateServices.Administration.AdminProxy]::GetUpdateServer($server, $false, $port)  }  $computerScope = New-Object Microsoft.UpdateServices.Administration.ComputerTargetScope  $updateScope = New-Object Microsoft.UpdateServices.Administration.UpdateScope  $updateScope.UpdateSources = [Microsoft.UpdateServices.Administration.UpdateSources]::MicrosoftUpdate  $wsusMachines = $wsus.GetComputerTargets($computerScope)  foreach machine in QSUS, write the full domain name $wsusMachines | ForEach-Object {  Write-host $.FullDomainName  $updates = $.GetUpdateInstallationInfoPerUpdate($updateScope)  foreach update for each machine, write the update title, installation state and securitybulletin $updates | ForEach-Object {  $update = $wsus.GetUpdate($.UpdateId) # Returns an object that implements Microsoft.UpdateServices.Administration.IUpdate $updateTitle = $update.Title | Write-Host $updateInstallationState = $.UpdateInstallationState | Write-Host $updateSecurityBulletin = $update.SecurityBulletins | Write-Host  $updateCveIds = $update.CveIDs # ERROR: Property 'CveIDs' belongs to IUpdate2, not IUpdate  }  }

    Read the article

  • Validate a single property with the Fluent Validation Library for .Net

    - by Blegger
    Can you validate just a single property with the Fluent Validation Library, and if so how? I thought this discussion thread from January of 2009 showed me how to do it via the following syntax: validator.Validate(new Person(), x => x.Surname); Unfortunately it doesn't appear this works in the current version of the library. One other thing that led me to believe that validating a single property might be possible is the following quote from Jeremy Skinners' blog post: "Finally, I added the ability to be able to execute some of FluentValidation’s Property Validators without needing to validate the entire object. This means it is now possible to stop the default “A value was required” message from being added to ModelState. " However I do not know if that necessarily means it supports just validating a single property or the fact that you can tell the validation library to stop validating after the first validation error.

    Read the article

  • How do I encrypt property values in Nant?

    - by Diego C.
    I need to store authentication information and I rather not have the password in plain text: <property name="user" value="theUser"/> <property name="password" value="secret"/> Has anyone figured out a way to encrypt property values in Nant? I've looked in Nant and Nantcontrib docs but no mention of encryption. I am considering going the route of creating my own Nant Task. Any suggestions?

    Read the article

  • Hiding a UINavigationController's UIToolbar during viewWillDisappear:

    - by Nathan de Vries
    I've got an iPhone application with a UITableView menu. When a row in the table is selected, the appropriate view controller is pushed onto the application's UINavigationController stack. My issue is that the MenuViewController does not need a toolbar, but the UIViewControllers which are pushed onto the stack do. Each UIViewController that gets pushed calls setToolbarHidden:animated: in viewDidAppear:. To hide the toolbar, I call setToolbarHidden:animated: in viewWillDisappear:. Showing the toolbar works, such that when the pushed view appears the toolbar slides up and the view resizes correctly. However, when the back button is pressed the toolbar slides down but the view does not resize. This means that there's a black strip along the bottom of the view as the other view transitions in. I've tried adding the toolbar's height to the height of the view prior to hiding the toolbar, but this causes the view to be animated during the transition so that there's still a black bar. I realise I can manage my own UIToolbar, but I'd like to use UINavigationControllers built in UIToolbar for convenience. This forum post mentions the same issue, but no workaround is mentioned.

    Read the article

  • Style Trigger on Attached Property

    - by vanja.
    I have created my own Attached Property like this: public static class LabelExtension { public static bool GetSelectable(DependencyObject obj) { return (bool)obj.GetValue(SelectableProperty); } public static void SetSelectable(DependencyObject obj, bool value) { obj.SetValue(SelectableProperty, value); } // Using a DependencyProperty as the backing store for Selectable. This enables animation, styling, binding, etc... public static readonly DependencyProperty SelectableProperty = DependencyProperty.RegisterAttached("Selectable", typeof(bool), typeof(Label), new UIPropertyMetadata(false)); } And then I'm trying to create a style with a trigger that depends on it: <!--Label--> <Style TargetType="{x:Type Label}"> <Style.Triggers> <Trigger Property="Util:LabelExtension.Selectable" Value="True"> <Setter Property="Template"> <Setter.Value> <ControlTemplate TargetType="{x:Type Label}"> <TextBox IsReadOnly="True" Text="{TemplateBinding Content}" /> </ControlTemplate> </Setter.Value> </Setter> </Trigger> </Style.Triggers> </Style> But I'm getting a run time exception: Cannot convert the value in attribute 'Property' to object of type 'System.Windows.DependencyProperty'. Error at object 'System.Windows.Trigger' in markup file How can I access the value of the attached property in a style trigger? I have tried using a DataTrigger with a RelativeSource binding but it wasn't pulling the value through.

    Read the article

  • drafts folder hidden outlook 2003

    - by Michael
    Let's say I have managed to hide the draftsfolder in outlook2003. I am wondering how I would be able to retreive it back without the use of 3rd party programs. (for instance as described in this article). I have the following code in outlook 2007. Sub changeProperty() Dim ns As Outlook.NameSpace Dim drafts As Outlook.folder Dim property As Variant property = False Set ns = Outlook.GetNamespace("MAPI") Set drafts = ns.GetDefaultFolder(olFolderDrafts) drafts.PropertyAccessor.SetProperty "http://schemas.microsoft.com/mapi/proptag/0x10F4000B", property End Sub Is there any way to perform this in outlook 2003? (Also thinking if this should be put on superuser.com instead?)

    Read the article

  • HttpWebRequest socket operation during WPF binding in a property getter

    - by wpfwannabe
    In a property getter of a C# class I am doing a HTTP GET using HttpWebRequest to some https address. WPF's property binding seems to choke on this. If I try to access the property in a simple method e.g. Button_Clicked, it works perfectly. If I use WPF binding to access the same property, the app seems to be blocked on a socket's recv() method indefinitely. Is it a no-no to do this sort of thing during binding? Is app in some special state during binding? Is there an easy way for me to overcome this limitation and still maintain the same basic idea?

    Read the article

  • DateTime Property not firing PropertyChanged event when changed

    - by Brent
    I'm working on a WPF MVVM application and I've got a TextBox on my view that is bound to a DateTime property on the ViewModel. Seems simple enough, but when I clear the text in the TextBox, the property never changes. In fact, it never even fires until I begin typing "4/1..." and then it fires. What can I do to fix this? Obviously I could bind the TextBox to a string property and then update the real property in the setter, but that's a bit of a hack. There's got to be a better way... ViewModel private DateTime _startDate; public DateTime StartDate { get { return _startDate; } set { _startDate = value; OnPropertyChanged("StartDate"); } } View <TextBox Text="{Binding Path=StartDate, UpdateSourceTrigger=PropertyChanged, ValidatesOnDataErrors=true}"/>

    Read the article

  • Simple Properties in Objective-C Classes

    - by tarnfeld
    Hey, I've bene working with Objective-C for a while now, and so far I have never really needed to craft my own classes, properly. I am a bit confused with the two arguments you can give the @property(a, b) declaration in a header file. When creating outlets to Interface Builder I usually do @property(nonatomic, retain) but I have no idea what this means. I'm writing a simple class which has a set of properties which will be set from the outside, like [instance setName:@"Bla Bla Bla"]; or I guess like instance.name = @"Bla@" but I would rather the first option. How would I declare this kind of property on a class? Thanks in advanced! Sorry for the n00bish question :-)

    Read the article

  • SolidColorBrush thickness property

    - by developer
    Hi All, Is it possible to set thickness property of SolidColorBrush. The reason I am asking is that I have a IValueConverter binding to Textbox Border BorderBrush property and I am dynamically setting the color of the textbox using the below code, SolidColorBrush tbbrush = new SolidColorBrush(Colors.DarkGray); return tbbrush; I also want to change the thickness property of the border, but without writing a new IValueConverter. Is it possible?

    Read the article

  • How can i ignore map property in NHibernate with setter

    - by Emilio Montes
    i need ignore map property with setter in NHibernate, because the relationship between entities is required. this is my simple model public class Person { public virtual Guid PersonId { get; set; } public virtual string FirstName { get; set; } public virtual string SecondName { get; set; } //this is the property that do not want to map public Credential Credential { get; set; } } public class Credential { public string CodeAccess { get; set; } public bool EsPremium { get; set; } } public sealed class PersonMap : ClassMapping<Person> { public PersonMap() { Table("Person"); Cache(x => x.Usage(CacheUsage.ReadWrite)); Id(x => x.Id, m => { m.Generator(Generators.GuidComb); m.Column("PersonId"); }); Property(x => x.FirstName, map => { map.NotNullable(true); map.Length(255); }); Property(x => x.SecondName, map => { map.NotNullable(true); map.Length(255); }); } } I know that if I leave the property Credential {get;} I was not going to take the map of NHibernate, but I need to set the value. Thanks in advance.

    Read the article

  • SL4 - Binding DataGridTextColumn to a property

    - by Brent
    I have a DataGrid. In the DataGrid's AutoGeneratingColumn event I have some code that looks like this: if (e.Property.Name.Contains("MetaData")) { var descCol = new DataGridTextColumn(e.Property); var bnd = new Binding("Description"); bnd.Mode = BindingMode.TwoWay; descCol.Binding = bnd; e.Column = descCol; e.Column.Header = "Description"; return; } The column binds to a type MetaData which has a string property named Description that I would like displayed in my DataGrid. So far I've been unable to get the value of the Description property to display in my DataGrid. I think the path I am passing into the Binding constructor might be incorrect. I've tried "MetaData.Description" as well and it doesn't work either. Can anyone help me properly set up the binding on my DataGridTextColumn?

    Read the article

  • Release a retain UIImage property loaded via imageNamed?

    - by user158103
    In my class object i've defined a (nonatomic, retain) property for UIImage. I assigned this property with an image loaded via [UIImage imageNamed:@"file.png"]; If at some point I want to reassign this property to another image, should I have to release the prior reference? I am confused because by the retain property I know i should release it. But because imageNamed is a convenience method (does not use alloc), im not sure what rule to apply here. Thanks for the insight!

    Read the article

  • Calculated property with JPA / Hibernate

    - by Francois
    My Java bean has a childCount property. This property is not mapped to a database column. Instead, it should be calculated by the database with a COUNT() function operating on the join of my Java bean and its children. It would be even better if this property could be calculated on demand / "lazily", but this is not mandatory. In the worst case scenario, I can set this bean's property with HQL or the Criteria API, but I would prefer not to. The Hibernate @Formula annotation may help, but I could barely find any documentation. Any help greatly appreciated. Thanks.

    Read the article

  • Method Vs Property

    - by obsoleteattribute
    Hi, I'm a newbie to .NET. I have a class called Project, a project can have multiple forecasts.Now If I want to check if the projects has any forecasts or not should I use a readonly boolean property called HasForecast() or should I use a method named HasForecast() which basically returns a boolean value.From framework design guidelines I came to know that methods should be used when the operation is complex,since here I'm retrieving the value of forecasts from DB should I consider method, or since it is a logical data member should I use a property.If I use a property can I call a method in DBLayer from its getter.Please explain Regards, Ravi

    Read the article

  • WPF Trigger when Property and Data value are true

    - by KrisTrip
    I need to be able to change the style of a control when a property and data value are true. For example, my bound data has an IsDirty property. I would like to change the background color of my control when IsDirty is true AND the control is selected. I found the MultiTrigger and MultiDataTrigger classes...but in this case I need to somehow trigger on data and property. How can I do this?

    Read the article

  • Silverlight 3 data-binding child property doesn't update

    - by sonofpirate
    I have a Silverlight control that has my root ViewModel object as it's data source. The ViewModel exposes a list of Cards as well as a SelectedCard property which is bound to a drop-down list at the top of the view. I then have a form of sorts at the bottom that displays the properties of the SelectedCard. My XAML appears as (reduced for simplicity): <StackPanel Orientation="Vertical"> <ComboBox DisplayMemberPath="Name" ItemsSource="{Binding Path=Cards}" SelectedItem="{Binding Path=SelectedCard, Mode=TwoWay}" /> <TextBlock Text="{Binding Path=SelectedCard.Name}" /> <ListBox DisplayMemberPath="Name" ItemsSource="{Binding Path=SelectedCard.PendingTransactions}" /> </StackPanel> I would expect the TextBlock and ListBox to update whenever I select a new item in the ComboBox, but this is not the case. I'm sure it has to do with the fact that the TextBlock and ListBox are actually bound to properties of the SelectedCard so it is listening for property change notifications for the properties on that object. But, I would have thought that data-binding would be smart enough to recognize that the parent object in the binding expression had changed and update the entire binding. It bears noting that the PendingTransactions property (bound to the ListBox) is lazy-loaded. So, the first time I select an item in the ComboBox, I do make the async call and load the list and the UI updates to display the information corresponding to the selected item. However, when I reselect an item, the UI doesn't change! For example, if my original list contains three cards, I select the first card by default. Data-binding does attempt to access the PendingTransactions property on that Card object and updates the ListBox correctly. If I select the second card in the list, the same thing happens and I get the list of PendingTransactions for that card displayed. But, if I select the first card again, nothing changes in my UI! Setting a breakpoint, I am able to confirm that the SelectedCard property is being updated correctly. How can I make this work???

    Read the article

  • Show / Hiding Divs

    - by Rob
    After cobbling together a few questions I've managed to get this far to showing / hiding divs: $(document).ready(function(){ $('.box').hide(); $('#categories').onMouseOver(function() { $('.box').hide(); $('#div' + $(this).val()).show(); }); }); HTML: <div id="categories"> <div id="btn-top20"><a href="">Top 20 Villas</a></div> <div id="btn-villaspec"><a href="">Villa Specials</a></div> <div id="btn-staffpicks"><a href="">Our Staff Picks</a></div> </div> <div id="category-content"> <div id="divarea1" class="box"> Content 1 </div> <div id="divarea2" class="box"> Content 2 </div> <div id="divarea3" class="box"> Content 3 </div> </div> What am I missing?

    Read the article

  • Use eval to set unknown property in Python

    - by Mahi
    I have an User class, that has multiple properties inside it, and I also have addPoint method for User class, which allows user to input points into any of it's properties. However, there can be up to like 500 properties, everyone can have different ones, etc. So it would be a pain in the ass to code every property with "if: - elif:". Now this is what I tried to do, to make it much easier and cleaner: class User: def __init__(self): self.health = 0 self.speed = 0 def addPoint(self, property, amount): eval("self."+property) = eval("self."+property) + amount And now when I'd do fe. u = User() u.addPoint("health", 5) I would like it to do this: self.health = self.health + 5, and that's what I used the eval()s for. However, Python's just giving me error: can't assign to function call. I'm not trying to assign the eval() function call itself, I'm trying to assign the returned value from eval(), so how could I do this the easiest way?

    Read the article

  • Setting property of objects in datacontext

    - by ryudice
    Hi, all my entities have a common property which specifies the company they belong to, I would like to set this property in a method in my datacontext but I do not want to use the partial methods for each of the entity types that the datacontext provides, is there a method that receives any entity that is inserted throught the datacontext so that I can hook to it or override it and set the property using reflection? thanks.

    Read the article

< Previous Page | 10 11 12 13 14 15 16 17 18 19 20 21  | Next Page >