Search Results

Search found 7705 results on 309 pages for 'wpf designer'.

Page 11/309 | < Previous Page | 7 8 9 10 11 12 13 14 15 16 17 18  | Next Page >

  • WPF: Sort of inconsistence in the visual appearence of WPF controls derived by Selector class

    - by msfanboy
    Hello, focused items == selected items but selected items != focused items. Have you ever wondered about that? Do you specially style the backcolor of a focused/selected item ? I ask this question because a user has an enabled button because some customer items are selected. The user is wondering now "why the heck can I delete this customers (button is enabled...) when I have just clicked on the orders control selecting some orders ready to delete (button is enabled too). The thing is the selected customer items are nearly looking grayed out in the default style... Well its sort of inconsistence to the user NOT to the programmer because WE know the behavior. Do you cope with stuff like that?

    Read the article

  • Visual C# GUI Designer basic tutorial

    - by cusack
    Hi, can you recommend a Visual C# Form Designer tutorial that is targeted at experienced programmers who have at least a basic knowledge of C# but are new to the VS C# Form Designer. At least it shouldn't be targeted at programming newbs, like Introduction to Visual C# 2008 Express Edition (it explains how a comment looks like in C#). So far I've found C# Programming Tutorial - Programming Winforms in C# on stackoverflow. Wishlist: ;-) I'm more interested in focus on the designer itself rather than an explanation of single gui-elements. In other words explaining separation between generated-code, what to not edit manually (visual-c#-designer-responsibility) and on the other hand the parts for which the programmer himself is responsible. So a little more abstract best-practice point of view pointing out some caveats would be great as well. I would prefer text over video as well, but that's minor. /Wishlist Perhaps even a Microsoft reference specific to the Visual c# forms designer (which I seem to have been unable to find) would be helpful.

    Read the article

  • Making a C# w/ WPF multiple frame text / pseudo-calendar GUI application [closed]

    - by Gregor Samsa
    I am editing a recently asked question and making it specific, taking the advice of some people here. I would like to program of the following simple form: The user can produce X number of resizable frames (analogous to HTML frames). Each frame serves as a simple text editor, which you can type into and save the whole configuration including resized windows and text. The user should be able alternately "freeze" and present the information, and "unfreeze" and edit frames. I want to use C## with WPF, in Microsoft's Visual C#. I do not yet know this language. I am sure I can pick up the syntax, but I would like to ask about some general advice for how to structure such a program. I have never made a GUI program, let alone one that interfaces with a notepad or some basic text editor. Can someone either direct me to a good resource that will teach me how to do the above? Or outline the basic ingredients that such a program will require, keeping in mind that though I know some C and Python, I have no experience with GUIs or advanced programming generally? In particular I don't know how to incorporate this "text editor" aspect of the program, as well as the resizable frames I would greatly appreciate any help.

    Read the article

  • an enter key are handled twice in WPF/Winform mixed project

    - by user527403
    I have a winform dashboard which hosts some WPF dialogs. When I select a row in the winform ListView and hit Enter key, OnItemActivate is called which launches a WPF dialog. However, the WPF dialog appears and then disappears immediately because the default button “cancel” is hit. It seems that the Enter key is triggered twice, one for launching the WPF dialog, the other for hitting cancel button. We don’t want the WPF dialog to be canceled by the Enter key hitting. According to the stack trace, it looks like that WPF and Winform handle the enter key separately. The WPF does not know that the enter key has been handled by the Winform ListView. Is this by design in Winform and WPF interop? To make the enter key not close the WPF dialog, we have to change the focus from the cancel button to another control (e.g. a textblock). Is there a better way to fix/around this issue?

    Read the article

  • WPF TextBlock refresh in real time

    - by TheOnlyBrien
    I'm new to C#, in fact, this is one of the first projects I've tried to start on my own. I am curious why the TextBlock will not refresh with the following code? The WPF window does not even show up when I add the "while" loop to the code. I just want this to have a real time display of the days since I was born. Please help me out or give me constructive direction. using System; using System.Collections.Generic; using System.Linq; using System.Text; using System.Threading.Tasks; using System.Windows; using System.Windows.Controls; using System.Windows.Data; using System.Windows.Documents; using System.Windows.Input; using System.Windows.Media; using System.Windows.Media.Imaging; using System.Windows.Navigation; using System.Windows.Shapes; namespace daysAliveWPF { /// <summary> /// Interaction logic for MainWindow.xaml /// </summary> public partial class MainWindow : Window { public MainWindow() { InitializeComponent(); DateTime myBirthday = new DateTime(1984, 01, 19); while (true) { TimeSpan daysAlive = DateTime.Now.Subtract(myBirthday); MyTextBlock.Text = daysAlive.TotalDays.ToString(); } } } } Similar code has worked in a Console Window application, so I don't understand what's going on here. Console Application code snip that did work is: using System; using System.Collections.Generic; using System.Linq; using System.Text; using System.Threading.Tasks; namespace DisplayRealTime { class Program { static void Main(string[] args) { DateTime myBirthday = new DateTime(1984, 06, 19); while (true) { TimeSpan daysAlive = DateTime.Now.Subtract(myBirthday); Console.Write("\rTotal Days Alive: {0}", daysAlive.TotalDays.ToString(".#####")); } } } } Thank you!

    Read the article

  • What is a good alternative to the WPF WebBrowser Control?

    - by VoidDweller
    I have an MDI WPF app that I need to add web content to. At first, great it looks like I have 2 options built into the framework the Frame control and the WebBrowser control. Given that this is an MDI app it doesn't take long to discover that neither of these will work. The WPF WebBrowser control wraps up the IE WebBrowser ActiveX Control which uses the Win32 graphics pipeline. The "Airspace" issue pretty much sums this up as "Sorry, the layouts will not play nice together". Yes, I have thought about taking snapshots of the web content rendering these and mapping the mouse and keyboard events back to the browser control, but I can't afford the performance penalty and I really don't have time to write and thoroughly test it. I have looked for third party controls, but so far I have only found Chris Cavanagh's WPF Chromium Web Browser control. Which wraps up Awesomium 1.5. Together these are very cool, they play nice with the WPF layouts. But they do not meet my performance requirements. They are VERY HEAVY on memory consumption and not to friendly with CPU usage either. Not to mention still quite buggy. I'll elaborate if you are interested. So, do any of you know of a stable performant WPF web browser control? Thanks.

    Read the article

  • How do I pass arguments to pages in a WPF application?

    - by Rod
    I'm working on upgrading a really old VB6 app to a WPF application. This will be a page-based app, but not a XBAP. The old VB6 app had a start form where a user would enter search criteria. Then they would get results in a grid, select a row in the grid and then click on one of 3 buttons. I am thinking that what I'll do is use hyperlink controls on the WPF app. No matter what button the user clicked on the old VB6 app, it would go to a second form. What it did on the second form was dependent upon which button the user clicked on the first form. So, I want the first page in my WPF app to do the same thing, but depending upon which hyperlink they click on will dictate what happens on the second page. They will either (a) go to the second page to edit the details as well as a lot more information, related to what they selected on the first page, or (b) enter a new record and all associated data (a new client, in this case), or (c) create a new case for the same client, selected on the first page. For me the hard thing is I don't know how to pass that information along to the second page. Is there something in WPF like in HTML where there's a query string? Or how do you get information from the first page to the second page, in WPF? I'm working in VS 2008.

    Read the article

  • Control to Control Binding in WPF/Silverlight

    - by psheriff
    In the past if you had two controls that you needed to work together, you would have to write code. For example, if you want a label control to display any text a user typed into a text box you would write code to do that. If you want turn off a set of controls when a user checks a check box, you would also have to write code. However, with XAML, these operations become very easy to do. Bind Text Box to Text Block As a basic example of this functionality, let’s bind a TextBlock control to a TextBox. When the user types into a TextBox the value typed in will show up in the TextBlock control as well. To try this out, create a new Silverlight or WPF application in Visual Studio. On the main window or user control type in the following XAML. <StackPanel>  <TextBox Margin="10" x:Name="txtData" />  <TextBlock Margin="10"              Text="{Binding ElementName=txtData,                             Path=Text}" /></StackPanel> Now run the application and type into the TextBox control. As you type you will see the data you type also appear in the TextBlock control. The {Binding} markup extension is responsible for this behavior. You set the ElementName attribute of the Binding markup to the name of the control that you wish to bind to. You then set the Path attribute to the name of the property of that control you wish to bind to. That’s all there is to it! Bind the IsEnabled Property Now let’s apply this concept to something that you might use in a business application. Consider the following two screen shots. The idea is that if the Add Benefits check box is un-checked, then the IsEnabled property of the three “Benefits” check boxes will be set to false (Figure 1). If the Add Benefits check box is checked, then the IsEnabled property of the “Benefits” check boxes will be set to true (Figure 2). Figure 1: Uncheck Add Benefits and the Benefits will be disabled. Figure 2: Check Add Benefits and the Benefits will be enabled. To accomplish this, you would write XAML to bind to each of the check boxes in the “Benefits To Add” section to the check box named chkBenefits. Below is a fragment of the XAML code that would be used. <CheckBox x:Name="chkBenefits" /> <CheckBox Content="401k"           IsEnabled="{Binding ElementName=chkBenefits,                               Path=IsChecked}" /> Since the IsEnabled property is a boolean type and the IsChecked property is also a boolean type, you can bind these two together. If they were different types, or if you needed them to set the IsEnabled property to the inverse of the IsChecked property then you would need to use a ValueConverter class. SummaryOnce you understand the basics of data binding in XAML, you can eliminate a lot code. Connecting controls together is as easy as just setting the ElementName and Path properties of the Binding markup extension. NOTE: You can download the complete sample code at my website. http://www.pdsa.com/downloads. Choose Tips & Tricks, then "SL – Basic Control Binding" from the drop-down. Good Luck with your Coding,Paul Sheriff ** SPECIAL OFFER FOR MY BLOG READERS **Visit http://www.pdsa.com/Event/Blog for a free eBook on "Fundamentals of N-Tier".

    Read the article

  • WPF ListView as a DataGrid – Part 3

    - by psheriff
    I have had a lot of great feedback on the blog post about turning the ListView into a DataGrid by creating GridViewColumn objects on the fly. So, in the last 2 parts, I showed a couple of different methods for accomplishing this. Let’s now look at one more and that is use Reflection to extract the properties from a Product, Customer, or Employee object to create the columns. Yes, Reflection is a slower approach, but you could create the columns one time then cache the View object for re-use. Another potential drawback is you may have columns in your object that you do not wish to display on your ListView. But, just because so many people asked, here is how to accomplish this using Reflection.   Figure 1: Use Reflection to create GridViewColumns. Using Reflection to gather property names is actually quite simple. First you need to pass any type (Product, Customer, Employee, etc.) to a method like I did in my last two blog posts on this subject. Below is the method that I created in the WPFListViewCommon class that now uses reflection. C#public static GridView CreateGridViewColumns(Type anyType){  // Create the GridView  GridView gv = new GridView();  GridViewColumn gvc;   // Get the public properties.  PropertyInfo[] propInfo =          anyType.GetProperties(BindingFlags.Public |                                BindingFlags.Instance);   foreach (PropertyInfo item in propInfo)  {    gvc = new GridViewColumn();    gvc.DisplayMemberBinding = new Binding(item.Name);    gvc.Header = item.Name;    gvc.Width = Double.NaN;    gv.Columns.Add(gvc);  }   return gv;} VB.NETPublic Shared Function CreateGridViewColumns( _  ByVal anyType As Type) As GridView  ' Create the GridView   Dim gv As New GridView()  Dim gvc As GridViewColumn   ' Get the public properties.   Dim propInfo As PropertyInfo() = _    anyType.GetProperties(BindingFlags.Public Or _                          BindingFlags.Instance)   For Each item As PropertyInfo In propInfo    gvc = New GridViewColumn()    gvc.DisplayMemberBinding = New Binding(item.Name)    gvc.Header = item.Name    gvc.Width = [Double].NaN    gv.Columns.Add(gvc)  Next   Return gvEnd Function The key to using Relection is using the GetProperties method on the type you pass in. When you pass in a Product object as Type, you can now use the GetProperties method and specify, via flags, which properties you wish to return. In the code that I wrote, I am just retrieving the Public properties and only those that are Instance properties. I do not want any static/Shared properties or private properties. GetProperties returns an array of PropertyInfo objects. You can loop through this array and build your GridViewColumn objects by reading the Name property from the PropertyInfo object. Build the Product Screen To populate the ListView shown in Figure 1, you might write code like the following: C#private void CollectionSample(){  Product prod = new Product();   // Setup the GridView Columns  lstData.View =      WPFListViewCommon.CreateGridViewColumns(typeOf(Product));  lstData.DataContext = prod.GetProducts();} VB.NETPrivate Sub CollectionSample()  Dim prod As New Product()   ' Setup the GridView Columns  lstData.View = WPFListViewCommon.CreateGridViewColumns( _       GetType(Product))  lstData.DataContext = prod.GetProducts()End Sub All you need to do now is to pass in a Type object from your Product class that you can get by using the typeOf() function in C# or the GetType() function in VB. That’s all there is to it! Summary There are so many different ways to approach the same problem in programming. That is what makes programming so much fun! In this blog post I showed you how to create ListView columns on the fly using Reflection. This gives you a lot of flexibility without having to write extra code as was done previously. NOTE: You can download the complete sample code (in both VB and C#) at my website. http://www.pdsa.com/downloads. Choose Tips & Tricks, then "WPF ListView as a DataGrid – Part 3" from the drop-down. Good Luck with your Coding,Paul Sheriff ** SPECIAL OFFER FOR MY BLOG READERS **Visit http://www.pdsa.com/Event/Blog for a free eBook on "Fundamentals of N-Tier".  

    Read the article

  • Of WPF and Winforms, which is the better skills to have in the job market?

    - by CraigJ
    I have a large VB6 desktop app which I would like to upgrade to .NET in order to take advantage of the newer .NET API. I am at a loose end as to whether to adopt WPF or Winforms when creating the new .NET solution. I realise that WPF seems to be in some ways the successor of Winforms. The only thing stopping me taking on WPF for this project is my concern that when the project has been completed the job marketplace will still be calling for Winforms skills and not necessarily WPF. Is this a valid concern? Note: I am aware there are existing questions on "WPF vs Winforms" generally, but this question relates to my specific concern about the job market.

    Read the article

  • Launching a WPF Window in a Separate Thread, Part 1

    - by Reed
    Typically, I strongly recommend keeping the user interface within an application’s main thread, and using multiple threads to move the actual “work” into background threads.  However, there are rare times when creating a separate, dedicated thread for a Window can be beneficial.  This is even acknowledged in the MSDN samples, such as the Multiple Windows, Multiple Threads sample.  However, doing this correctly is difficult.  Even the referenced MSDN sample has major flaws, and will fail horribly in certain scenarios.  To ease this, I wrote a small class that alleviates some of the difficulties involved. The MSDN Multiple Windows, Multiple Threads Sample shows how to launch a new thread with a WPF Window, and will work in most cases.  The sample code (commented and slightly modified) works out to the following: // Create a thread Thread newWindowThread = new Thread(new ThreadStart( () => { // Create and show the Window Window1 tempWindow = new Window1(); tempWindow.Show(); // Start the Dispatcher Processing System.Windows.Threading.Dispatcher.Run(); })); // Set the apartment state newWindowThread.SetApartmentState(ApartmentState.STA); // Make the thread a background thread newWindowThread.IsBackground = true; // Start the thread newWindowThread.Start(); .csharpcode, .csharpcode pre { font-size: small; color: black; font-family: consolas, "Courier New", courier, monospace; background-color: #ffffff; /*white-space: pre;*/ } .csharpcode pre { margin: 0em; } .csharpcode .rem { color: #008000; } .csharpcode .kwrd { color: #0000ff; } .csharpcode .str { color: #006080; } .csharpcode .op { color: #0000c0; } .csharpcode .preproc { color: #cc6633; } .csharpcode .asp { background-color: #ffff00; } .csharpcode .html { color: #800000; } .csharpcode .attr { color: #ff0000; } .csharpcode .alt { background-color: #f4f4f4; width: 100%; margin: 0em; } .csharpcode .lnum { color: #606060; } This sample creates a thread, marks it as single threaded apartment state, and starts the Dispatcher on that thread. That is the minimum requirements to get a Window displaying and handling messages correctly, but, unfortunately, has some serious flaws. The first issue – the created thread will run continuously until the application shuts down, given the code in the sample.  The problem is that the ThreadStart delegate used ends with running the Dispatcher.  However, nothing ever stops the Dispatcher processing.  The thread was created as a Background thread, which prevents it from keeping the application alive, but the Dispatcher will continue to pump dispatcher frames until the application shuts down. In order to fix this, we need to call Dispatcher.InvokeShutdown after the Window is closed.  This would require modifying the above sample to subscribe to the Window’s Closed event, and, at that point, shutdown the Dispatcher: // Create a thread Thread newWindowThread = new Thread(new ThreadStart( () => { Window1 tempWindow = new Window1(); // When the window closes, shut down the dispatcher tempWindow.Closed += (s,e) => Dispatcher.CurrentDispatcher.BeginInvokeShutdown(DispatcherPriority.Background); tempWindow.Show(); // Start the Dispatcher Processing System.Windows.Threading.Dispatcher.Run(); })); // Setup and start thread as before This eliminates the first issue.  Now, when the Window is closed, the new thread’s Dispatcher will shut itself down, which in turn will cause the thread to complete. The above code will work correctly for most situations.  However, there is still a potential problem which could arise depending on the content of the Window1 class.  This is particularly nasty, as the code could easily work for most windows, but fail on others. The problem is, at the point where the Window is constructed, there is no active SynchronizationContext.  This is unlikely to be a problem in most cases, but is an absolute requirement if there is code within the constructor of Window1 which relies on a context being in place. While this sounds like an edge case, it’s fairly common.  For example, if a BackgroundWorker is started within the constructor, or a TaskScheduler is built using TaskScheduler.FromCurrentSynchronizationContext() with the expectation of synchronizing work to the UI thread, an exception will be raised at some point.  Both of these classes rely on the existence of a proper context being installed to SynchronizationContext.Current, which happens automatically, but not until Dispatcher.Run is called.  In the above case, SynchronizationContext.Current will return null during the Window’s construction, which can cause exceptions to occur or unexpected behavior. Luckily, this is fairly easy to correct.  We need to do three things, in order, prior to creating our Window: Create and initialize the Dispatcher for the new thread manually Create a synchronization context for the thread which uses the Dispatcher Install the synchronization context Creating the Dispatcher is quite simple – The Dispatcher.CurrentDispatcher property gets the current thread’s Dispatcher and “creates a new Dispatcher if one is not already associated with the thread.”  Once we have the correct Dispatcher, we can create a SynchronizationContext which uses the dispatcher by creating a DispatcherSynchronizationContext.  Finally, this synchronization context can be installed as the current thread’s context via SynchronizationContext.SetSynchronizationContext.  These three steps can easily be added to the above via a single line of code: // Create a thread Thread newWindowThread = new Thread(new ThreadStart( () => { // Create our context, and install it: SynchronizationContext.SetSynchronizationContext( new DispatcherSynchronizationContext( Dispatcher.CurrentDispatcher)); Window1 tempWindow = new Window1(); // When the window closes, shut down the dispatcher tempWindow.Closed += (s,e) => Dispatcher.CurrentDispatcher.BeginInvokeShutdown(DispatcherPriority.Background); tempWindow.Show(); // Start the Dispatcher Processing System.Windows.Threading.Dispatcher.Run(); })); // Setup and start thread as before This now forces the synchronization context to be in place before the Window is created and correctly shuts down the Dispatcher when the window closes. However, there are quite a few steps.  In my next post, I’ll show how to make this operation more reusable by creating a class with a far simpler API…

    Read the article

  • WPF ListView as a DataGrid – Part 2

    - by psheriff
    In my last blog post I showed you how to create GridViewColumn objects on the fly from the meta-data in a DataTable. By doing this you can create columns for a ListView at runtime instead of having to pre-define each ListView for each different DataTable. Well, many of us use collections of our classes and it would be nice to be able to do the same thing for our collection classes as well. This blog post will show you one approach for using collection classes as the source of the data for your ListView.  Figure 1: A List of Data using a ListView Load Property NamesYou could use reflection to gather the property names in your class, however there are two things wrong with this approach. First, reflection is too slow, and second you may not want to display all your properties from your class in the ListView. Instead of reflection you could just create your own custom collection class of PropertyHeader objects. Each PropertyHeader object will contain a property name and a header text value at a minimum. You could add a width property if you wanted as well. All you need to do is to create a collection of property header objects where each object represents one column in your ListView. Below is a simple example: PropertyHeaders coll = new PropertyHeaders(); coll.Add(new PropertyHeader("ProductId", "Product ID"));coll.Add(new PropertyHeader("ProductName", "Product Name"));coll.Add(new PropertyHeader("Price", "Price")); Once you have this collection created, you could pass this collection to a method that would create the GridViewColumn objects based on the information in this collection. Below is the full code for the PropertyHeader class. Besides the PropertyName and Header properties, there is a constructor that will allow you to set both properties when the object is created. C#public class PropertyHeader{  public PropertyHeader()  {  }   public PropertyHeader(string propertyName, string headerText)  {    PropertyName = propertyName;    HeaderText = headerText;  }   public string PropertyName { get; set; }  public string HeaderText { get; set; }} VB.NETPublic Class PropertyHeader  Public Sub New()  End Sub   Public Sub New(ByVal propName As String, ByVal header As String)    PropertyName = propName    HeaderText = header  End Sub   Private mPropertyName As String  Private mHeaderText As String   Public Property PropertyName() As String    Get      Return mPropertyName    End Get    Set(ByVal value As String)      mPropertyName = value    End Set  End Property   Public Property HeaderText() As String    Get      Return mHeaderText    End Get    Set(ByVal value As String)      mHeaderText = value    End Set  End PropertyEnd Class You can use a Generic List class to create a collection of PropertyHeader objects as shown in the following code. C#public class PropertyHeaders : List<PropertyHeader>{} VB.NETPublic Class PropertyHeaders  Inherits List(Of PropertyHeader)End Class Create Property Header Objects You need to create a method somewhere that will create and return a collection of PropertyHeader objects that will represent the columns you wish to add to your ListView prior to binding your collection class to that ListView. Below is a sample method called GetProperties that builds a list of PropertyHeader objects with properties and headers for a Product object. C#public PropertyHeaders GetProperties(){  PropertyHeaders coll = new PropertyHeaders();   coll.Add(new PropertyHeader("ProductId", "Product ID"));  coll.Add(new PropertyHeader("ProductName", "Product Name"));  coll.Add(new PropertyHeader("Price", "Price"));   return coll;} VB.NETPublic Function GetProperties() As PropertyHeaders  Dim coll As New PropertyHeaders()   coll.Add(New PropertyHeader("ProductId", "Product ID"))  coll.Add(New PropertyHeader("ProductName", "Product Name"))  coll.Add(New PropertyHeader("Price", "Price"))   Return collEnd Function WPFListViewCommon Class Now that you have a collection of PropertyHeader objects you need a method that will create a GridView and a collection of GridViewColumn objects based on this PropertyHeader collection. Below is a static/Shared method that you might put into a class called WPFListViewCommon. C#public static GridView CreateGridViewColumns(  PropertyHeaders properties){  GridView gv;  GridViewColumn gvc;   // Create the GridView  gv = new GridView();  gv.AllowsColumnReorder = true;   // Create the GridView Columns  foreach (PropertyHeader item in properties)  {    gvc = new GridViewColumn();    gvc.DisplayMemberBinding = new Binding(item.PropertyName);    gvc.Header = item.HeaderText;    gvc.Width = Double.NaN;    gv.Columns.Add(gvc);  }   return gv;} VB.NETPublic Shared Function CreateGridViewColumns( _    ByVal properties As PropertyHeaders) As GridView  Dim gv As GridView  Dim gvc As GridViewColumn   ' Create the GridView  gv = New GridView()  gv.AllowsColumnReorder = True   ' Create the GridView Columns  For Each item As PropertyHeader In properties    gvc = New GridViewColumn()    gvc.DisplayMemberBinding = New Binding(item.PropertyName)    gvc.Header = item.HeaderText    gvc.Width = [Double].NaN    gv.Columns.Add(gvc)  Next   Return gvEnd Function Build the Product Screen To build the window shown in Figure 1, you might write code like the following: C#private void CollectionSample(){  Product prod = new Product();   // Setup the GridView Columns  lstData.View = WPFListViewCommon.CreateGridViewColumns(       prod.GetProperties());  lstData.DataContext = prod.GetProducts();} VB.NETPrivate Sub CollectionSample()  Dim prod As New Product()   ' Setup the GridView Columns  lstData.View = WPFListViewCommon.CreateGridViewColumns( _       prod.GetProperties())  lstData.DataContext = prod.GetProducts()End Sub The Product class contains a method called GetProperties that returns a PropertyHeaders collection. You pass this collection to the WPFListViewCommon’s CreateGridViewColumns method and it will create a GridView for the ListView. When you then feed the DataContext property of the ListView the Product collection the appropriate columns have already been created and data bound. Summary In this blog you learned how to create a ListView that acts like a DataGrid using a collection class. While it does take a little code to do this, it is an alternative to creating each GridViewColumn in XAML. This gives you a lot of flexibility. You could even read in the property names and header text from an XML file for a truly configurable ListView. NOTE: You can download the complete sample code (in both VB and C#) at my website. http://www.pdsa.com/downloads. Choose Tips & Tricks, then "WPF ListView as a DataGrid – Part 2" from the drop-down. Good Luck with your Coding,Paul Sheriff ** SPECIAL OFFER FOR MY BLOG READERS **Visit http://www.pdsa.com/Event/Blog for a free eBook on "Fundamentals of N-Tier".  

    Read the article

  • Where is the handy designer for setting Permissions and schema diagram designer in a SQL2005 Databas

    - by BlackMael
    I have just installed the GDR RTM version of Visual Studio Team System Database Edition GDR RTM. It all seems to work wonderfully, but I seem to have to edit XML (Database.sqlpermissions) for specify SQL Permissions. Am I missing something? For that matter where is the schema diagram tool? I understand GDR exposes alot for extending the Database Edition components, so am I supposed to wait for third party extensions to provide the diagram tool and permissions designer?

    Read the article

  • Web Designer and/or Developer

    - by chimps
    we've outsourced our app development, the dev's have created a DB hosted on Amazon-EC2. we're in talks with a web designer for website but the designer does not do any backend integration. i.e connect the website with DB created by app developers do you recommend getting designs from the designer and getting a freelancer to do the front-back end integration, I mean would there be issues/complications? Or go with designer who provides the complete package?

    Read the article

  • Does anyone know of a good Commercial WPF Web Browser Control?

    - by VoidDweller
    I have an MDI WPF app that I need to add web content too. At first, great it looks like I have 2 options built into the framework the Frame control and the WebBrowser control. Given that this is an MDI app it doesn't take long to discover that neither of these will work. The WebBrowser control wraps up the IE WebBrowser ActiveX Control which uses the Win32 graphics pipeline. The "Airspace" issue pretty much sums this up as "Sorry, the layouts will not play nice together". Yes, I have thought about taking snapshots of the web content rendering these and mapping the mouse and keyboard events back to the browser control, but I can't afford the performance penalty and I really don't have time to write and thoroughly test it. I have looked for third party controls, but so far I have only found Chris Cavanagh's WPF Chromium Web Browser control. Which wraps up Awesomium 1.5. Together these are very cool, they play nice with the WPF layouts. But they do not meet my performance requirements. They are VERY HEAVY on memory consumption and not to friendly with CPU usage either. Not to mention still quite buggy. I'll elaborate if you are interested. So, do any of you know of a stable performant WPF web browser control? Thanks.

    Read the article

  • Sharing SharePoint Lists across sites without SharePoint Designer

    - by Ryan
    The problem I've been having is how to show a list from one sub-site to another. I don't have server admin privileges so I am unable to use SharePoint Designer to edit any part of the site. The situation: One parent page with two sub-sites. sub-site #1 has a list on it with several text columns, and one column to be used as a 'visible' column. sub-site #2 has to show a view of the list on sub-site #1 filtering on the 'visible' column The two solutions I've found are to create a linked list in SharePoint Designer directly, or use a Content Query Web Part, edit the part to show the correct columns, and use SharePoint Designer to edit the item style to actually display the proper information. Is there any way to accomplish this without using SharePoint Designer?

    Read the article

  • Is there a WPF Cheat Sheet available?

    - by Pop Catalin
    I'm looking for a WPF cheat sheet that has the WPF markup extensions for binding, resources, and other common things in WPF.But so far I've had trouble finding it. Anyone know where I could find one? Thanks Edit: Thanks to John and Nir for creating two WPF cheat sheets and posting them here John's XAML for WPF CheatSheet 1.0 (Draft) Nir's WPF XAML Data Binding Cheat Sheet

    Read the article

  • Workflow Foundation (WF) -- Why does Visual Studio's designer not use my custom ActivityDesignerThem

    - by stakx
    Problem: I am trying to customize a custom Workflow Foundation activity (called CustomActivity) so that it will display with a specific background color. What I've got so far: First, I'm defining a custom ActivityDesignerTheme as follows: public class CustomActivityTheme : ActivityDesignerTheme { public CustomActivityTheme(WorkflowTheme theme) : base(theme) { this.BackColorStart = Color.FromArgb(0xff, 0xf4, 0xf4, 0xf4); this.BackColorEnd = Color.FromArgb(0xff, 0xc0, 0xc0, 0xc0); this.BackgroundStyle = LinearGradientMode.Horizontal; } } Then, I am applying this theme to a custom ActivityDesigner (apparently the theme must be applied to a designer, and not to an activity): [ActivityDesignerTheme(typeof(CustomActivityTheme))] public class CustomActivityDesigner : SequentialActivityDesigner { ... } Ultimately, I am applying the custom designer to my custom Activity: [Designer(typeof(CustomActivityDesigner))] public partial class CustomActivity : SequenceActivity { ... } Now, according to some code examples that I've seen, this should do the trick. However, when I include an instance of my CustomActivity in a workflow, my custom theme is not applied and it is displayed in the Visual Studio Designer as any standard activity would (white background etc.). I tried re-compiling and even re-starting Visual Studio a couple of times, just to make sure the used assembly is up-to-date, but to no avail. My question: What am I missing? Why does Visual Studio's Workflow Designer not respect the CustomActivityTheme when it displays a CustomActivity?

    Read the article

  • Visual Studio 2005 - OleDbConnection throws "Invalid authorization specification" in Form Designer,

    - by Jason Dagit
    I have a form with an OleDbConnection object on it. This form fails to load in the Form Designer with the message: One or more errors encountered while loading the designer. The errors are listed below. Some errors can be fixed by rebuilding your project, while others may require code changes. Invalid authorization specification at ADODB.ConnectionClass.Open(String ConnectionString, String UserID, String Password, Int32 Options) ... (stack trace continues into user code) I've tracked this down to the OleDbConnection string. If I hardcode in the server IP, username/password/dbinstance into the constructor of the GUI form then the form will load in the designer. At run-time it is not an issue because we require the user to provide the login details. The question: Is it possible to use the OleDbConnection and the Form designer without supplying the database credentials in the source code of the form? For example, is there a property of the OleDbConnection or Form that I can set so that it doesn't need to access the database during Form design? My concern is that if we ever move the database server or change the login that the code will stop working in the designer.

    Read the article

  • Java errors on Lotus Domino Designer Client 8.5.1

    - by ajcooper
    I have a clean install of Lotus Notes 8.5.1 (now with FP3) and I'm getting the following errors in Designer. This is with a new database with a couple of forms and views. I'm finding this is typical across all databases. Is there something I need to install/configure etc.? I'm not new to Notes, but I'm new to 8.5 Thanks Aidan Description Resource Path Location Type Cannot resolve plug-in: org.eclipse.core.runtime plugin.xml TestAgent.nsf line 9 Plug-in Problem Cannot resolve plug-in: org.eclipse.ui plugin.xml TestAgent.nsf line 8 Plug-in Problem Cannot resolve plug-in: com.ibm.commons plugin.xml TestAgent.nsf line 10 Plug-in Problem Cannot resolve plug-in: com.ibm.commons.vfs plugin.xml TestAgent.nsf line 12 Plug-in Problem Cannot resolve plug-in: com.ibm.commons.xml plugin.xml TestAgent.nsf line 11 Plug-in Problem Cannot resolve plug-in: com.ibm.designer.runtime plugin.xml TestAgent.nsf line 15 Plug-in Problem Cannot resolve plug-in: com.ibm.designer.runtime.directory plugin.xml TestAgent.nsf line 14 Plug-in Problem Cannot resolve plug-in: com.ibm.jscript plugin.xml TestAgent.nsf line 13 Plug-in Problem Cannot resolve plug-in: com.ibm.notes.java.api plugin.xml TestAgent.nsf line 20 Plug-in Problem Cannot resolve plug-in: com.ibm.xsp.core plugin.xml TestAgent.nsf line 16 Plug-in Problem Cannot resolve plug-in: com.ibm.xsp.core plugin.xml TestAgent.nsf line 21 Plug-in Problem Cannot resolve plug-in: com.ibm.xsp.designer plugin.xml TestAgent.nsf line 18 Plug-in Problem Cannot resolve plug-in: com.ibm.xsp.designer plugin.xml TestAgent.nsf line 22 Plug-in Problem Cannot resolve plug-in: com.ibm.xsp.domino plugin.xml TestAgent.nsf line 19 Plug-in Problem Cannot resolve plug-in: com.ibm.xsp.domino plugin.xml TestAgent.nsf line 23 Plug-in Problem Cannot resolve plug-in: com.ibm.xsp.extsn plugin.xml TestAgent.nsf line 17 Plug-in Problem Cannot resolve plug-in: com.ibm.xsp.extsn plugin.xml TestAgent.nsf line 24 Plug-in Problem Cannot resolve plug-in: com.ibm.xsp.rcp plugin.xml TestAgent.nsf line 25 Plug-in Problem

    Read the article

  • Sharepoint designer is replacing french characters with &#65533;

    - by chris
    First of all, I'm not a web designer, I'm a programmer, so I'm working a bit out of my knowledge area. However, as the person in my office who has some working knowledge of French, I'm stuck with this issue. The Problem: Sharepoint Designer is replacing all French accented characters with the &#65533; (square box or diamond-? �) character. It doesn't appear to matter if I enter the 'é' character as alt-130 (in either design or source or as &eacute; Everything works fine when editing, but when the file is saved and loaded into a browser, it replaces the characters. When reloading into designer, the file shows the 65533 symbol. EDIT: More info. I use &#233; and save, close SP designer, Reloading SP designer will show the é (instead of the code) in source. Next reload will have replaced it with &#65533; Question 1: (more important) HOW DO I STOP THIS!? Question 2: (more interesting) Why does this happen? Charset is iso-8859-1

    Read the article

  • C# menustrip designer

    - by Iceyoshi
    Hi, I'm not sure when this happened but when I was trying to edit a menustrip in my program (in the VS designer), I noticed that the menu items had be grouped or merged. Like: File Edit Format Insert ... Instead of being able to click each menu item and add sub-items to them in the designer, they all were grouped together so I couldn't edit the menu items separately, it's quite painful. I couldn't find any properties related to this, so how could I ungroup the menu items in the designer?

    Read the article

  • .Net Designer assemblies, C++\C# error

    - by greggorob64
    I'm working on an designer-heavy application (using Visual C++ 2.0, but a C# solution should still be relevant). My setup is this: I have a UserControl named "Host" I'm attempting a UserControl named "Child" Child contains a property to a class whose type is defined in a different dll entirely, named "mytools.dll" Child works just fine in the designer. However, when I go to drag "child" onto "host" from the designer, I get the following error: Failed to create component 'Child'. The error message follows: 'System.io.filenotfoundexception: could not load file or assembly MyTools, Version XXXXXX, Culture=neutral ..... {unhelpful callstack} If I comment out the property in "child" that points to the class in mytools.dll, everything designs just peachy. I have the property marked with "Browsable(false), and DesignerSerializable(hidden), and it does not help. Is there a way for me to explicitly say "Don't load this dll, you won't need it in design time", or some way for me to force a dll to load from the designer programmatically? Thanks!

    Read the article

< Previous Page | 7 8 9 10 11 12 13 14 15 16 17 18  | Next Page >