Search Results

Search found 6091 results on 244 pages for 'wpf storyboard'.

Page 26/244 | < Previous Page | 22 23 24 25 26 27 28 29 30 31 32 33  | Next Page >

  • WPF Datagrid -DataGridTemplateColumn tab focus issue

    I am using Microsoft WPF datagrid. I have noticed a strange behavior with WPF datagrid DataGridTemplateColumn. When you use the templateColumn in the grid and the template column contains some controls when you tab from the previous column the focus is not automatically given to the first element declared in the template column. The foucs is initally set on the border of the template column and when we tab of once agin the focus goes to the first column. Any workaround for this issue. How can i set the focus to go the first element in the template column of the datagrid when i tab off.

    Read the article

  • WPF version of Application.OpenForms

    - by Redburn
    I have an application in which I will have to get at another WPF window which is open. In WinForms, I was able to use: MainWindow main = (MainWindow)Application.OpenForms["MainWindow"]; To be able to access the the form. Now in WPF it does not exist. I have seen the other post on this site which is relevant, however it uses Application.Window which is not contained in the call. I just have : Current Equals GetContentStream GetCookie GetRemoteStream GetResourceStream LoadComponet RefrenceEquals ResourceAssembly SetCookie So my question is this, is there a different version for OpenForms, or is there just a different way to go about it.

    Read the article

  • How to print WPF Grid paged?

    - by Oliver Hanappi
    Hi! I'm printing a WPF grid. As long as the data fits on one page, everything works fine. But sometimes the grid contains more data. Therefore I need to split the grid into multiple pages. Can anybody help me? My code looks like this (visual is the grid). var printCapabilities = printDialog.PrintQueue.GetPrintCapabilities(printDialog.PrintTicket); var size = new Size(printCapabilities.PageImageableArea.ExtentWidth, printCapabilities.PageImageableArea.ExtentHeight); visual.Measure(size); visual.Arrange(new Rect(new Point(printCapabilities.PageImageableArea.OriginWidth, printCapabilities.PageImageableArea.OriginHeight), size)); printDialog.PrintVisual(visual, "Print ListView"); Should I try another control? I've tried WPF Toolkit DataGrid, but I couldn't manage to get it printed. I've heard something of a flow document, can this help me? Best Regards Oliver Hanappi

    Read the article

  • WPF DataGrid RowDataBound?

    - by SiN
    Ok this is driving me mad, I feel like a total Newbie. I'm using WPF's DataGrid control from Dynamic Data Display with .NET 3.5. Link on Codeplex here I want an equivalent to the classic GridView's RowDataBound event, and I can't find any. I tried working with LoadingRow, but it fires every time I scroll. I'm trying to change the background color of certain cells in my grid based on a database values. I'm new to WPF. Should I be using the XAML binding?

    Read the article

  • "No Source Available" when managed exception occurs - WPF Visual Studio 2010

    - by Sonic Soul
    for some reason, my visual studio 2010 is not loading debug symbols on my own code. i am using a default WPF application solution. with a sample WPF app i am working on, and running in Debug mode. when i go into debug, i can step through my code. BUT when exception happens in my code (i.e. throw new Exception("test")), visual studio gives me the blue blank screen with "No Source Available. No symbols are loaded blah blah.." AND i can actually "view" exception details, where it will tell me the line of code my exception occured on. so it does know what happened.. it seems. it seems to think that PDB files are not loaded. my setup: options Deubg "Enable just my code (managed only)" is checked. application properties : 1 project running in Debug x86

    Read the article

  • Using WPFPerf to profile a WPF 4.0 application doesn't show me any information

    - by Adrian
    I am trying to use WPFPerf to profile a WPF 4.0 application (I have the latest WPFPerf that should work on WPF 4.0 aps). I start the tool Visual Profiler from WPFPerf, I start my aplication, but after that nothing happens and the element tree from the Visual Profiler is empty. No other error message is shown. Can anyone tell me what am I not doint right? As an additional information, when I try to analize my .exe assembly or any other assembly from my application, I get a BadFormatException saying that the assembly was build with a newer version of .NET. From the download page http://go.microsoft.com/fwlink/?LinkID=191420 I see that this version of WPFPerf should be ok for my app

    Read the article

  • WPF Memory Leak

    - by Oskar Kjellin
    I have an WPF form that I myself did not create, so I am not very good at WPF. It is leaking badly though, up to 400 MB and closing the form does not help. The problem lies in my application loading all the pictures at once. I would like to only load the ones visible at the moment. It is about 300 pictures and they are a bit large so my WPF-form suffers from loading them all. I have a DataTemplate with my own type that has a property Thumbnail. The code in the template is like this: <Image Source="{Binding Path=Thumbnail}" Stretch="Fill"/> And then I have a grid with a control that has the above template as source. The code for this control is the below. Please provide me with hints on how to optimize the code and perhaps get the only ones that are visible and only have that many controls loaded at the same time? <Setter Property="Template"> <Setter.Value> <ControlTemplate TargetType="Controls:ElementFlow"> <Grid Background="{TemplateBinding Background}"> <Canvas x:Name="PART_HiddenPanel" IsItemsHost="True" Visibility="Hidden" /> <Viewport3D x:Name="PART_Viewport"> <!-- Camera --> <Viewport3D.Camera> <PerspectiveCamera FieldOfView="60" Position="0,1,4" LookDirection="0,-1,-4" UpDirection="0,1,0" /> </Viewport3D.Camera> <ContainerUIElement3D x:Name="PART_ModelContainer" /> <ModelVisual3D> <ModelVisual3D.Content> <AmbientLight Color="White" /> </ModelVisual3D.Content> </ModelVisual3D> <Viewport2DVisual3D RenderOptions.CachingHint="Cache" RenderOptions.CacheInvalidationThresholdMaximum="2" RenderOptions.CacheInvalidationThresholdMinimum="0.5"/> </Viewport3D> </Grid> </ControlTemplate> </Setter.Value> </Setter> </Style>

    Read the article

  • Hitting a ADO.NET Data Services from WPF client, forms authentication

    - by Soulhuntre
    Hey all! There are a number of questiosn on StackOverflow that ALMOST hit this topic head on, but they are either for other technologies, reference obsolets information or don;t supply an answer that I can suss out. So pardon the almost duplication :) I have a working ADO.NET Data Service, and a WPF client that hits it. Now that they are working fine I want to add authentication / security to the system. My understanding of the steps so far is... Turn on forms authentication and configure it on the server (I have an existing asp.net membership service DB for other aspects of this app, so that isnt a problem) so that it is required for the service URL In WCF apply for and recieve a forms authentication "ticket" as part of a login routine Add that "ticket" to the headers of the ADO.NET service calls in WPF Profit! All well and good - but does anyone have a line on a soup to nuts code sample, using the modern releases of these technologies? Thanks!

    Read the article

  • Where is the WPF Numeric UpDown control?

    - by AngryHacker
    Getting into the first serious WPF project. It seems like there are a lot of basic controls flat out missing. Specifically, I am looking for the Numeric UpDown control. Was there an out of band release that I missed? Really don't feel like writing my own control. I do not want to use the WindowsFormHost and plop a WinForm ctl on it. I want it to be fully WPF without any legacy junk. Thanks

    Read the article

  • How to autoscroll on WPF datagrid

    - by Christian
    Hi, I think I am stupid. I searched now for 15 minutes, and found several different solutions for scrolling on datagrids, but none seems to work for me. I am using WPF with .NET 3.5 and the WPF Toolkit DataGrid. My grid gets updated when my observable collection changes, works perfectly. Now, my DataGrid is located inside a normal Grid and scrollbars appear if the DataGrid gets to big. Also fine... And know, the 1.000.000 $ question: How do I get the datagrid to scroll to the last row. There is: no AutoScroll Property no CurrentRowSelected Index a CurrentCell, but no Collection I could use for CurrentCell = AllCells.Last Any ideas? I feel really stupid, and it seems strange that this question is so hard. What am I missing?

    Read the article

  • Force validation on bound controls in WPF

    - by Valentin Vasilyev
    Hello. I have a WPF dialog with a couple of textboxes on it. Textboxes are bound to my business object and have WPF validation rules attached. The problem is that user can perfectly click 'OK' button and close the dialog, without actually entering the data into textboxes. Validation rules never fire, since user didn't even attempt entering the information into textboxes. Is it possible to force validation checks and determine if some validation rules are broken? I would be able to do it when user tries to close the dialog and prohibit him from doing it if any validation rules are broken. Thank you.

    Read the article

  • Binding to a WPF hosted control's DependencyProperty in WinForms

    - by Reddog
    I have a WinForms app with some elements that are hosted WPF user controls (using ElementHost). I want to be able to bind my WinForm's control property (Button.Enabled) to a custom DependencyProperty of the hosted WPF user control (SearchResults.IsAccountSelected). Is it possible to bind a System.Windows.Forms.Binding to a property managed by a DependencyProperty? Also, since I know the System.Windows.Forms.Binding watches for INotifyPropertyChanged.PropertyChanged events - will a property backed by a DependencyProperty automatically fire these events or will I have to implement and manage the sending of PropertyChanged events manually?

    Read the article

  • Loading WPF satellite resources dynamically

    - by BJ
    Hello! I've read about satellite-assemblies being used in WPF localizations. However, I would like to ask if there is a way to load the satellite-assemblies without following the pre-defined directory structure that depends on the language (ex. If the system language is English, the WPF application looks for the satellite-assembly inside the "en-US" subfolder). This is because I would like to simply swap the satellite-assemblies when distributing the software package without having to create a specific folder per language that would hold the assemblies. I would just like to have the satellite-assembly and the main executable in the same directory. Is this possible and is there even an easy way to do this like simply loading the resource file on application startup once? Thanks!

    Read the article

  • How to use a FolderBrowserDialog from a WPF application

    - by Craig Shearer
    I'm trying to use the FolderBrowserDialog from my WPF application - nothing fancy. I don't much care that it has the Windows Forms look to it. However, when I call ShowDialog, I want to pass the owner window which is an IWin32Window. How do I get this from my WPF control? Actually, does it matter? If I run this code and use the ShowDialog overload with no parameters it works fine. Under what circumstances do I need to pass the owner window? Thanks, Craig

    Read the article

  • wpf usercontrol within usercontrol with the help of region manager

    - by Miral
    Sorry for weird title, actually i can only explain my question but cannot put in a few words in the title. I am developing WPF Composite application with PRISM approach. I have got a common WPF usercontrol which is gonna be used by all other usercontrol, i.e. usecontrol within a usercontrol. The common usercontrol has got a button "ProcessMultiple" which I want it to behave differently from all usercontrol. I am using RegionManager to add this views. I have got PresentationModel for all the usercontrol IRegion historyUpdaterRegion = _regionManager.Regions["HistoryUpdaterRegion"]; IRegionManager historyUpdaterRegionManager = historyUpdaterRegion.Add(_unityContainer.Resolve<IHistoryDocumentUpdaterPresentationModel>().View, null, true); historyUpdaterRegionManager.RegisterViewWithRegion("ProcessMultiple", () => _unityContainer.Resolve<IProcessMultiplePresentationModel>().View); IRegion refundArrivalRegion = _regionManager.Regions["RefundArrivalRegion"]; IRegionManager refundArrivalRegionManager = refundArrivalRegion.Add(_unityContainer.Resolve<IRefundArrivalProcessorPresentationModel>().View, null, true); refundArrivalRegionManager.RegisterViewWithRegion("ProcessMultiple", () => _unityContainer.Resolve<IProcessMultiplePresentationModel>().View);

    Read the article

  • WPF - RibbonControlLibrary not supported with Visual Studio 2010 ?

    - by KroaX
    Hi guys, Today i licensed and downloaded the WPF RibbonControlsLibrary from Microsoft which is an extension to the WPF Toolkit. I've read some tutorials to implement an examlpe here When I tried the example is sadly noticed that in XAML i could not access the referenced library. xmlns:ribbon="clr-namespace:Microsoft.Windows.Controls.Ribbon;assembly=RibbonControlsLibrary" <ribbon:Ribbon .... > I found out that the Problem lies within Visual Studio 2010 , because in Visual Studio 2008 everything works fine. Does anyone have a solution for this issue or a workaround to use the library in Visual Studio 2010 ?

    Read the article

  • Windows gadget in WPF - show while "Show desktop" is activated

    - by Jannick
    Hi I'm trying to create a "gadget" like application using WPF. The goal is to get the same behavior as a normal Windows 7 gadget: No task-bar entry Doesn't show up when you alt+tab windows NOT always on top, applications can be on top Visible while performing 'Aero Peek' Visible while using 'Show desktop' / Windows+D I've been able to accomplish the first four goals, but have been unable to find a solution to the fifth problem. The closest I've come is by using the utility class from http://stackoverflow.com/questions/75785/how-do-you-do-appbar-docking-to-screen-edge-like-winamp-in-wpf, but this turns the app into a "toolbar", thereby banishing applications from the part of the screen where my gadget GUI is placed. I can see that similar questions has been asked previously on Stackoverflow, but those have died out before a solution was found. Posting anyway in the hope that there is now someone out there with the knowledge to solve this =)

    Read the article

  • WPF WIN32 hwndhost WM_MOUSEMOVE WM_MOUSEHOVER

    - by Neil B
    I have a WPF app with a usercontrol that contains a HwndHost. The HwndHost is created as follows: hwndHost = CreateWindowEx(0, "static", "", WS_CHILD | WS_VISIBLE, 0, 0, hostHeight, hostWidth, hwndParent.Handle, (IntPtr)HOST_ID, IntPtr.Zero, 0); hwndControl = CreateWindowEx(0, "Static", "", WS_CHILD | WS_VISIBLE | WS_CLIPCHILDREN , 0, 0, hostHeight, hostWidth, hwndHost, (IntPtr)PICTUREBOX_ID, IntPtr.Zero, 0); I then hook into the message pump using HwndSourceHook and loads of messages come through. Except the ones I want i.e. WM_MOUSEMOVE, WM_MOUSEHOVER, WM_LBUTTONDOWN and WM_LBUTTONUP Also the OnMouseLeftButtonDown event is not fired in the WPF code on the main window or the control, I assume because windows is trapping it and throwing it away. Anybody know how I can get these to come through, either with or without using the WIN32 window messages?

    Read the article

  • C# WPF application is using too much memory while GC.GetTotalMemory() is low

    - by Dmitry
    I wrote little WPF application with 2 threads - main thread is GUI thread and another thread is worker. App has one WPF form with some controls. There is a button, allowing to select directory. After selecting directory, application scans for .jpg files in that directory and checks if their thumbnails are in hashtable. if they are, it does nothing. else it's adding their full filenames to queue for worker. Worker is taking filenames from this queue, loading JPEG images (using WPF's JpegBitmapDecoder and BitmapFrame), making thumbnails of them (using WPF's TransformedBitmap) and adding them to hashtable. Everything works fine, except memory consumption by this application when making thumbnails for big images (like 5000x5000 pixels). I've added textboxes on my form to show memory consumption (GC.GetTotalMemory() and Process.GetCurrentProcess().PrivateMemorySize64) and was very surprised, cuz GC.GetTotalMemory() stays close to 1-2 Mbytes, while private memory size constantly grows, especially when loading new image (~ +100Mb per image). Even after loading all images, making thumbnails of them and freeing original images, private memory size stays at ~700-800Mbytes. My VirtualBox is limited to 512Mb of physical memory and Windows in VirtualBox starts to swap alot to handle this huge memory consumption. I guess I'm doing something wrong, but I don't know how to investigate this problem, cuz according to GC, allocated memory size is very low. Attaching code of thumbnail loader class: class ThumbnailLoader { Hashtable thumbnails; Queue<string> taskqueue; EventWaitHandle wh; Thread[] workers; bool stop; object locker; int width, height, processed, added; public ThumbnailLoader() { int workercount,i; wh = new AutoResetEvent(false); thumbnails = new Hashtable(); taskqueue = new Queue<string>(); stop = false; locker = new object(); width = height = 64; processed = added = 0; workercount = Environment.ProcessorCount; workers=new Thread[workercount]; for (i = 0; i < workercount; i++) { workers[i] = new Thread(Worker); workers[i].IsBackground = true; workers[i].Priority = ThreadPriority.Highest; workers[i].Start(); } } public void SetThumbnailSize(int twidth, int theight) { width = twidth; height = theight; if (thumbnails.Count!=0) AddTask("#resethash"); } public void GetProgress(out int Added, out int Processed) { Added = added; Processed = processed; } private void AddTask(string filename) { lock(locker) { taskqueue.Enqueue(filename); wh.Set(); added++; } } private string NextTask() { lock(locker) { if (taskqueue.Count == 0) return null; else { processed++; return taskqueue.Dequeue(); } } } public static string FileNameToHash(string s) { return FormsAuthentication.HashPasswordForStoringInConfigFile(s, "MD5"); } public bool GetThumbnail(string filename,out BitmapFrame thumbnail) { string hash; hash = FileNameToHash(filename); if (thumbnails.ContainsKey(hash)) { thumbnail=(BitmapFrame)thumbnails[hash]; return true; } AddTask(filename); thumbnail = null; return false; } private BitmapFrame LoadThumbnail(string filename) { FileStream fs; JpegBitmapDecoder bd; BitmapFrame oldbf, bf; TransformedBitmap tb; double scale, dx, dy; fs = new FileStream(filename, FileMode.Open); bd = new JpegBitmapDecoder(fs, BitmapCreateOptions.None, BitmapCacheOption.OnLoad); oldbf = bd.Frames[0]; dx = (double)oldbf.Width / width; dy = (double)oldbf.Height / height; if (dx > dy) scale = 1 / dx; else scale = 1 / dy; tb = new TransformedBitmap(oldbf, new ScaleTransform(scale, scale)); bf = BitmapFrame.Create(tb); fs.Close(); oldbf = null; bd = null; GC.Collect(); return bf; } public void Dispose() { lock(locker) { stop = true; } AddTask(null); foreach (Thread worker in workers) { worker.Join(); } wh.Close(); } private void Worker() { string curtask,hash; while (!stop) { curtask = NextTask(); if (curtask == null) wh.WaitOne(); else { if (curtask == "#resethash") thumbnails.Clear(); else { hash = FileNameToHash(curtask); try { thumbnails[hash] = LoadThumbnail(curtask); } catch { thumbnails[hash] = null; } } } } } }

    Read the article

  • Consume a WebService with Integrated authentication from WPF windows application

    - by Tr1stan
    I have written a WPF windows application that consumes a .net WebService. This works fine when the web service in hosted to allow anonymous connections, however the WebService I need to consume when we go live will be held within a website that has Integrated Authentication enabled. The person running the WPF application will be logged onto a computer within the same domain as the web server and will have permission to see the WebService (without entering any auth info) if browsing to it using a web browser that is NTLM auth enabled. Is it possible to pass through the details of the already logged in user running the application to the WebService? Here is the code I'm currently using: MyWebService.SearchSoapClient client = new SearchSoapClient(); //From the research I've done I think I need to something with these: //UserName.PreAuthenticate = true; //System.Net.CredentialCache.DefaultCredentials; List<Person> result = client.FuzzySearch("This is my search string").ToList(); Any pointers much appreciated.

    Read the article

< Previous Page | 22 23 24 25 26 27 28 29 30 31 32 33  | Next Page >