Search Results

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

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

  • C++/CLI com-Interop: Exposing a reference type property to VBA

    - by Adam
    After long hours of investigation on exposing C# property that accepts a reference type to VBA, I concluded that it was not possible. In brief, a C# property that is of type double[] or even an object cannot be consumed in VBA like this: ' Compile Error: Function or interface marked as restricted, ' or the function uses an Automation type not supported in Visual Basic oComExposedEarlyBinding.ObjectArray = VBArray ' Run-time error 424: Object required oComExposedEarlyBinding.PlainObject = VBArray Or for more details: C# property exposed to VBA (COM) : Run-time error '424': Object required I would like to know if C++/CLI would support such an option? i.e. Allowing a reference-type property to be exposed to VBA so that a syntax like the above is valid. N.B. You can achieve this by using late binding, but losing the intellisense is not an option.

    Read the article

  • Entity Framework looking for wrong column

    - by m.edmondson
    I'm brand new to the Entity Framework and trying to learn all it can offer. I'm currently working my way through the MVC Music Store tutorial which includes the following code: public ActionResult Browse(string genre) { // Retrieve Genre and its Associated Albums from database var genreModel = storeDB.Genres.Include("Albums") .Single(g => g.Name == genre); return View(genreModel); } as I'm working in VB I converted it like so: Function Browse(ByVal genre As String) As ActionResult 'Retrieve Genre and its Associated Albums from database Dim genreModel = storeDB.Genres.Include("Albums"). _ Single(Function(g) g.Name = genre) Return(View(genreModel)) End Function The problem is I'm getting the following exception: Invalid column name 'GenreGenreId'. Which I know is true, but I can't for the life of my work out where it's getting 'GenreGenreId' from. Probably a basic question but I'll appreciate any help in the right direction. As per requested here is the source for my classes: Album.vb Public Class Album Private _title As String Private _genre As Genre Private _AlbumId As Int32 Private _GenreId As Int32 Private _ArtistId As Int32 Private _Price As Decimal Private _AlbumArtUrl As String Public Property Title As String Get Return _title End Get Set(ByVal value As String) _title = value End Set End Property Public Property AlbumId As Int16 Get Return _AlbumId End Get Set(ByVal value As Int16) _AlbumId = value End Set End Property Public Property GenreId As Int16 Get Return _GenreId End Get Set(ByVal value As Int16) _GenreId = value End Set End Property Public Property ArtistId As Int16 Get Return _ArtistId End Get Set(ByVal value As Int16) _ArtistId = value End Set End Property Public Property AlbumArtUrl As String Get Return _AlbumArtUrl End Get Set(ByVal value As String) _AlbumArtUrl = value End Set End Property Public Property Price As Decimal Get Return _Price End Get Set(ByVal value As Decimal) _Price = value End Set End Property Public Property Genre As Genre Get Return _genre End Get Set(ByVal value As Genre) _genre = value End Set End Property End Class Genre.vb Public Class Genre Dim _genreId As Int32 Dim _Name As String Dim _Description As String Dim _Albums As List(Of Album) Public Property GenreId As Int32 Get Return _genreId End Get Set(ByVal value As Int32) _genreId = value End Set End Property Public Property Name As String Get Return _Name End Get Set(ByVal value As String) _Name = value End Set End Property Public Property Description As String Get Return _Description End Get Set(ByVal value As String) _Description = value End Set End Property Public Property Albums As List(Of Album) Get Return _Albums End Get Set(ByVal value As List(Of Album)) _Albums = value End Set End Property End Class MusicStoreEntities.vb Imports System.Data.Entity Namespace MvcApplication1 Public Class MusicStoreEntities Inherits DbContext Public Property Albums As DbSet(Of Album) Public Property Genres As DbSet(Of Genre) End Class End Namespace

    Read the article

  • BasedOn property not working with ListView

    - by bobjink
    When I use the following code it works because I am using a ListBox <UserControl.Resources> <Style BasedOn="{StaticResource {x:Type ListBox}}" TargetType="{x:Type ListBox}"> <Setter Property="HorizontalContentAlignment" Value="Stretch"/> <Setter Property="Background" Value="Transparent" /> </Style> </UserControl.Resources> But when I use the following code to a ListView I get an warning/exception <UserControl.Resources> <Style BasedOn="{StaticResource {x:Type ListView}}" TargetType="{x:Type ListView}"> <Setter Property="HorizontalContentAlignment" Value="Stretch"/> <Setter Property="Background" Value="Transparent" /> </Style> </UserControl.Resources> "StaticResource reference 'System.Windows.Controls.ListView' was not found." Why and how to solve it? I want the functionality of a ListView.

    Read the article

  • Mimic property/list changes on an object on another object

    - by soundslike
    I need to mimic changes (property/list) changes on an object and then apply it to another object to keep the structure/property the same. In essence it's like cloning etc. the biz rules require certain properties to not be applied to the other object, so I can't just clone the object otherwise this would be easy. I've already walked the source object to get INotifyPropertyChanged and IListChanged events, so I have the "source" and the args (Property or List) changed event notifications. Given that I guess I could build a reflection "hierarchy path" starting from the top level of the source object to get to the Property or List changed "source" (which could be several levels deep). Ignoring for the moment that certain object properties should not propagate to the other object, what's a way to build this "path"? Is a brute force top level down to build the "path" (and discard on the way back up if we don't hit the original changed event "source") the only way to do it? Any clever ideas on how to mimic changes from one object to another object?

    Read the article

  • How can i look at a controller property to assign a classBinding in EmberJS Dynamically

    - by j_mcnally
    So far this is not working. Althrough the property should return true on my first page Props form GWVideoApp.VideosController isFirst: function() { return this.currentPage == 1; }.property(), isLast: function() { return this.currentPage == this.pages; }.property(), View: {{#view Ember.Button target="GWVideoApp.VideosController" classBinding="GWVideoApp.VideosController.isFirst:hide" tagName="li" action="prevPage"}}Prev{{/view}} When currentPage value changes the classBindings to do not

    Read the article

  • check property existence

    - by sam
    hello folks., in umbraco, is it possible to check if certain property exist for particular node ? for example, i am having 5 nodes and i am having media picker property for first node alone.. i need to check all the nodes whether media picker property is available for nodes or not? thank you

    Read the article

  • Encrypting 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

  • Sliding & hiding multiple panels in jQuery.

    - by lloydphillips
    I have a table with multiple rows in each row is a select list and based on the selection (when the onchange event is fired) panels appear containing additional data below the row.I currently have code like this: var allPnls = '.inv-dtl-comnts-add,.inv-dtl-comnts-update'; $(document).ready(function(){ hideAll(); //select action change $(".inv-dtl-ddlaction").change(onSelectChange); $(".btn-cancel").click(function(event){ slideAll(); $(".inv-dtl-ddlaction").val('[Select an Action]'); return false; }); }); function onSelectChange(event){ //find out which select item was clicked switch($(this).val()) { case 'View/Add Comment': $(this).closest(".row").children(allPnls).slideUp("fast", function(){ $(this).closest(".row").children(".inv-dtl-comnts-add").slideToggle("fast"); }); break; case 'Change Status': $(this).closest(".row").children(allPnls).slideUp("fast", function(){ $(this).closest(".row").children(".inv-dtl-comnts-update").slideToggle("fast"); }); break; default: //code to be executed if n is different from case 1 and 2 } } function hideAll(){ $(allPnls).hide(); } function slideAll(){ $(allPnls).slideUp("fast"); } So I'm hiding all the panels when the page loads and if a panel is already open I want to slide it shut before reopening the new panel. This works with the postback. With just one panel in the selection it worked great but with two panels the sliding up happens twice (it seems to slide down unopened panels before sliding them back up again). How can I adjust this so that I can get all panels listed in the variable allPnls to slide shut ONLY if they are already open? Is there a better way of sliding the panels shut and then having a callback to have the slideToggle work? Lloyd

    Read the article

  • problem in showing and hiding dialog boxes in MFC

    - by Rakesh
    Hello all, I am trying to create a wizard like structure using dialog boxes...So I replaced the code in CDialog1App as below CDialog1Dlg* dlg = new CDialog1Dlg; m_pMainWnd = dlg; dlg->Create(IDD_DIALOG1); dlg->ShowWindow(SW_SHOW); the above worked fine...its displying the dialog box.but I have added another dialog box... So in the first dialog box if the user clicks Next it has to hide the first dialog box and display the second dialog.. //CDialog1 class void CDialog1Dlg::OnBnClickedNext() { // TODO: Add your control notification handler code here CDialog2* dialog2 = new CDialog2(); dialog2->Create(IDD_DIALOG2); dialog2->ShowWindow(SW_SHOW); this->ShowWindow(SW_HIDE); } in the above code am creating an object for the Dialog2 class and trying to show that.... Now the problem is,when I click next its hiding both the windows..What can I do..I tried several types but its still its not workin..Please dont suggest me to do with PropertySheet..It will work with that, i know ...but I want this using Dialog Box for some reason

    Read the article

  • Processing a property in linq to sql

    - by Mostafa
    Hi It's my first LINQ TO SQL Project , So definitely my question could be naive . Till now I used to create new property in Business Object beside of every DateTime Property , That's because i need to do some processing in my DateTime property and show it in special string format for binding to UI Controls .Like : private DateTime _insertDate; /// /// I have "InertDate" field in my Table on Database /// public DateTime InsertDate { get { return _insertDate; } set { _insertDate = value; } } // Because i need to do some processing I create a readonly string property that pass InsertDate to Utility method and return special string Date public string PInsertDate { get { return Utility.ToSpecialDate(_insertDate); } } My question is I don't know how to do it in LINQ . I did like follow but i get run time error. ToosDataContext db = new ToosDataContext(); var newslist = from p in db.News select new {p.NewsId,p.Title,tarikh =MD.Utility.ToSpecialDate( p.ReleaseDate)}; GridView1.DataSource = newslist; GridView1.DataBind();

    Read the article

  • setting user.dir system property in JBoss 5.1

    - by Spiderman
    In JBoss 4.2.3 the System property 'user.dir' is defined to be <JBoss-root>/bin when I ran the same application on JBoss 5.1 I noticed that it cannot find the System property user.dir why there is no default definition for version 5.1? and how can I define it manually? I followed this suggestion and added my property into properties-service.xml but it had no affect and still JBoss couldn't find the system:user.dir value.

    Read the article

  • hiding text using "text-indent"

    - by Crippletoe
    hi all, i am trying to hide some text inside an on my website using the text indent property (setting it to text-indent: -999px;). for some reason this doesnt work when i set the direction of the document to "rtl" (my site is in Hebrew, which is written from right to left). under "rtl" direction, the text still shows. anyone knows any way around this? thanks

    Read the article

  • How can i bind parent's property to its child's property?

    - by walkor
    I have a GroupBox, which is defined like this <ResourceDictionary xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation" xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml" xmlns:local="clr-namespace:Groupbox" > <Style TargetType="local:GroupBox"> <Setter Property="BorderBrush" Value="DarkGray"/> <Setter Property="BorderThickness" Value="1"/> <Setter Property="Padding" Value="6"/> <Setter Property="Template"> <Setter.Value> <ControlTemplate TargetType="local:GroupBox"> <Grid Background="{TemplateBinding Background}"> <Grid.RowDefinitions> <RowDefinition Height="Auto"/> <RowDefinition Height="Auto"/> <RowDefinition Height="*"/> </Grid.RowDefinitions> <Border BorderThickness="{TemplateBinding BorderThickness}" Grid.Row="1" Grid.RowSpan="2" BorderBrush="{TemplateBinding BorderBrush}" CornerRadius="3"> <Border.Clip> <GeometryGroup FillRule="EvenOdd"> <RectangleGeometry x:Name="FullRect" Rect="0,0,300,200"/> <RectangleGeometry x:Name="HeaderRect" Rect="6,0,100,100"/> </GeometryGroup> </Border.Clip> </Border> <ContentPresenter Grid.Row="2" ContentTemplate="{TemplateBinding ContentTemplate}" Content="{TemplateBinding Content}" Margin="{TemplateBinding Padding}"/> <ContentControl x:Name="HeaderContainer" Margin="6,0,0,0" Grid.Row="0" Grid.RowSpan="2" HorizontalAlignment="Left"> <ContentPresenter Margin="3,0,3,0" ContentTemplate="{TemplateBinding HeaderTemplate}" Content="{TemplateBinding Header}"/> </ContentControl> </Grid> </ControlTemplate> </Setter.Value> </Setter> </Style> </ResourceDictionary> And i'm using this control like this <Controls:GroupBox x:Name="GroupBox"> <Controls:GroupBox.HeaderTemplate> <DataTemplate> <CheckBox "Header" x:Name="cbHeader"/> </DataTemplate> </Controls:GroupBox.HeaderTemplate> <Controls:GroupBox> So, well, my questions - how can i bind property IsEnabled of GroupBox to the Checkbox property IsChecked? Thanks in advance.

    Read the article

  • Use Excel Table Column in ComboBox Input Range property

    - by V7L
    I asked this in StackOverflow and was redirected here. Apologies for redundancy. I have an Excel worksheet with a combo box on Sheet1 that is populated via its Input Range property from a Dynamic Named Range on Sheet2. It works fine and no VBA is required. My data on Sheet2 is actually in an Excel Table (all data is in the XLS file, no external data sources). For clarity, I wanted to use a structured table reference for the combo box's Input Range, but cannot seem to find a syntax that works, e.g. myTable[[#Data],[myColumn3]] I cannot find any indications that the combo box WILL accept structured table references, though I cannot see why it wouldn't. So, two part question: 1. Is is possible to use a table column reference in the combo box input range property (not using VBA) and 2. HOW?

    Read the article

  • adding a property to an EventArgs

    - by aleroot
    I have extended the standard FileSystemWatcher class by adding a string property (fileToTest), now i need to extend also the FileSystemEventArgs to add this property how can i do this ? my extend FileSystemWatcher : class AleFileSystemWatcher : FileSystemWatcher { public string fileToTest { get; set; } } The FileSystemEventArgs fileToTest property should be the same of AleFileSystemWatcher fileToTest . Can i do this ?

    Read the article

  • Azure Table Storage rejects an entity with a Property whose value is an Interface

    - by Andrew B Schultz
    I have a type called "Comment" that I'm saving to Azure Table Storage. Since a comment can be about any number of other types, I created an interface which all of these types implement, and then put a property of type ICommentable on the comment. So Comment has a property called About of type ICommentable. When I try to save a Comment to Azure Table Storage, if the Comment.About property has a value, I get the worthless invalid input error. However, if there is no value for Comment.About, I have no problem. Why would this be? Comment.About is not the only property that is a reference type. For example, Comment.From is a reference type, but the Comment.About is the only property of a type that is an interface. Fails: var comment = new Comment(); comment.CommentText = "It fails!"; comment.PartitionKey = "TEST"; comment.RowKey = "TEST123"; comment.About = sow1; comment.From = person1; Works: var comment = new Comment(); comment.CommentText = "It works!"; comment.PartitionKey = "TEST"; comment.RowKey = "TEST123"; //comment.About = sow1; comment.From = person1; Thanks!

    Read the article

  • Binding for MinWidth property does not work in Silverlight

    - by Akash Kava
    I have noticed something very unusual today, I need to bind "MinWidth" property of TextBlock to some value, however following example does not work. It only accepts MinWidth at a time of creation, but after that it is not affected at all if LeftWidth property is changed at runtime, however if I bind LeftWidth property to WidthProperty it works well. Binding b = new Binding("LeftWidth"); // following never changes layout of control tb.SetBinding(TextBlock.MinWidthProperty,b); However, this one works correctly, // following never changes layout of control tb.SetBinding(TextBlock.WidthProperty,b); Now I also did hook events and tried to do InvalidateMeasure and InvalidateArrange on TextBlock, but it has no effect. Seems like Changing MinWidth Property after layout pass does not work at all. Can it be a bug in Silverlight? or Does anyone have any idea at all why MinWidth does not redo the layout?

    Read the article

  • Custom XAML property

    - by Scott Silvi
    Hey all - I've seen a library that allows me to do this inside my XAML, which sets the visibility of the control based on whether or not the user is in a role: s:Authorization.RequiresRole="Admin" Using that library with my database requires a bunch of coding that I can't really do right now. Ultimately here's what I want to know... I have received the authenticated users role from my SPROC, and its currently stored in my App.xaml.cs as a property (not necessary for the final solution, just FYI for now). I want to create a property (dependency property? attached property?) that allows me to say something very similar to what the other library has: RequiresRole="Admin", which would collapse the visibility if the user is not in the Admin role. Can anyone point me in the right direction on this? Thanks, Scott

    Read the article

  • Hiding UITableViewCell

    - by live2dream95
    Is there a way to hide a UITableView cell? I'm looking for some property or method I can invoke on the UITableViewCell returned by a synchronous cellForRowAtIndexPath() to hide it and make it unselectable by the user.

    Read the article

  • access property value of one class from another internal class in C#

    - by starz26
    how do i acces the property value from an internal class , see below? namespace N1 { public class ClassA { string var1 = null; private ClassB b; public ClassA() { var1 = "one"; b = new ClassB(); } //property public string Var1 { get{ return var1; } } } namespace N1 { internal class ClassB { private void method() { // I need to access the value of Var1( property) from here, how to do this? } } }

    Read the article

  • Entity Framework model and foreign key property

    - by verror
    I have 2 tables that I import to EF model. First table has a property [section] that acts as foreign key to the second table. When I map this property in model to the table and try to compile I get this error: Problem in Mapping Fragments starting at lines 158, 174: Non-Primary-Key column(s) [Section] are being mapped in both fragments to different conceptual side properties - data inconsistency is possible because the corresponding conceptual side properties can be independently modified. If i remove this property from the model it passes, but when I query the data I don't have the section field. I know that I can get it by using the navigation field and reading this property from the second table, but to make it work I must include the other table in my query. var res = from name in Context.Table1.Include("Table2")... Why do I need to include the association just for one field?

    Read the article

  • List and ReadOnly property

    - by Luca
    List (and List) instances can be readonly, seeing ReadOnly property; methods throws exceptions in the case the collection have the property ReadOnly property. How can I create readonly List instances? What are the main uses?

    Read the article

  • Scroll view to bottom while keyboard is hiding

    - by Manu
    Hi! I'm using a scroll view to move my view and show certain text fields (that otherwise would be hidden) when the keyboard shows. I basically resize the scroll view to make room for the keyboard, and then scroll up the view smoothly with "scrollRectToVisible", which works perfectly. After that, I can scroll and edit the rest of the text fields without lowering the keyboard, which is what I intend. The problem comes when I want to hide the keyboard again. I have been able to lower the keyboard and scroll down the view to its original position without a problem, but I have been unable to make that transition smooth. At the moment I use the following: - (void)keyboardWillHide: (NSNotification *)notif { CGRect topRect = CGRectMake(0, 0, 1, 1); [scrollview scrollRectToVisible:topRect animated:YES]; scrollview.frame = CGRectMake(0, 0, scrollviewWidth, scrollviewHeight); } I create a CGRect at the top, which I then move into view with "scrollRectToVisible". That works fine and commences the scrolling right when the keyboard is hiding (I use "keyboardWillHide" and not "keyboardDidHide" because the scroll view frame is still missing its lower part). The problem comes when I resize the scroll view frame back to its original dimensions (which I need to do), because then the scrolling is interrupted and the view drops to the bottom suddenly (as there is nothing else to scroll). This causes a glitch, which is why I cannot complete the transition smoothly. Any ideas on how could I lower the keyboard while scrolling the view down smoothly? Should I be scrolling up a bigger view, instead of resizing it? That way I would not have to restore the scroll view frame dimensions when lowering the keyboard, or would I? Thanks very much in advance!

    Read the article

  • How to make a private property?

    - by mystify
    I tried to make a private property in my *.m file: @interface MyClass (Private) @property (nonatomic, retain) NSMutableArray *stuff; @end @implementation MyClass @synthesize stuff; // not ok Compiler claims that there's no stuff property declared. But there's a stuff. Just in an anonymous category. Let me guess: Impossible. Other solutions?

    Read the article

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