Search Results

Search found 8544 results on 342 pages for 'wpf navigation'.

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

  • How can I generate a 2d navigation mesh in a dynamic environment at runtime?

    - by Stephen
    So I've grasped how to use A* for path-finding, and I am able to use it on a grid. However, my game world is huge and I have many enemies moving toward the player, which is a moving target, so a grid system is too slow for path-finding. I need to simplify my node graph by using a navigational mesh. I grasp the concept of "how" a mesh works (finding a path through nodes on the vertices and/or the centers of the edges of polygons). My game uses dynamic obstacles that are procedurally generated at run-time. I can't quite wrap my head around how to take a plane that has multiple obstacles in it and programatically divide the walkable area up into polygons for the navigation mesh, like the following image. Where do I start? How do I know when a segment of walk-able area is already defined, or worse, when I realize I need to subdivide a previously defined walk-able area as the algorithm "walks" through the map? I'm using javascript in nodejs, if it matters.

    Read the article

  • How can I generate a navigation mesh for a tile grid?

    - by Roflha
    I haven't actually started programming for this one yet, but I wanted to see how I would go about doing this anyway. Say I have a grid of tiles, all of the same size, some traversable and some not. How would I go about creating a navigation mesh of polygons from this grid? My idea was to take the non-traversable tiles out and extend lines from there edges to make polygons... that's all I have got so far. Any advice?

    Read the article

  • Do navigation menu links negatively impact SEO for pages' content?

    - by Rodolfo
    I've always had my doubts about navigation menus effect on SEO. You know, the vertical menus on the top that show in every page in the site linking to main sections and subsections. My issue is that if not done dynamically (i.e. after page is loaded or something), from a search engine's point of view it probably looks like a whole bunch of links in the beginning of the page, and links that probably have nothing to do with the page being analyzed, so it's probably not only confusing it, but also giving link 'juice' to the wrong pages or reducing its value. When I've asked SEO people about this, I usually get a "Google is smart, they'll recognize it as a menu and ignore it" response, but I'm not convinced (and the 'Google is smart' argument sounds almost like religion discussion to me). So does it affect SEO negatively or not? Are there any official posts on this topic?

    Read the article

  • Google I/O 2012 - Navigation in Android

    Google I/O 2012 - Navigation in Android Adam Powell, Richard Fulcher An app is useless if people can't find their way around it. Android introduced big navigation-support changes in 3.0 and 4.0. The Action Bar offers a convenient control for Up navigation, the Back key's behavior became more consistent within tasks, and the Recent Tasks UI got an overhaul. In this talk, we discuss how and why we got where we are today, how to think about navigation when designing your app's user experience, and how to write apps that offer effortless navigation in multiple Android versions. For all I/O 2012 sessions, go to developers.google.com From: GoogleDevelopers Views: 31 0 ratings Time: 01:01:53 More in Science & Technology

    Read the article

  • WPF dynamic layout: how to enforce square proportions (width equals height)?

    - by Gart
    I'm learning WPF and can't figure out how to enfore my buttons to take a square shape. Here is my XAML Markup: <Window x:Class="Example" xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation" xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml" Height="368" Width="333"> <Window.Resources> <Style x:Key="ToggleStyle" BasedOn="{StaticResource {x:Type ToggleButton}}" TargetType="{x:Type RadioButton}"> </Style> </Window.Resources> <RadioButton Style="{StaticResource ToggleStyle}"> Very very long text </RadioButton> </Window> Specifying explicit values for Width and Height attributes seems like a wrong idea - the button should calculate its dimensions based on its contents automagically, but keep its width and height equal. Is this possible?

    Read the article

  • How to disable border of WPF button when click it?

    - by Ekkapop
    How to disable border of WPF button when I click it? I have create button like below, everything work fine except when I click on the button. <Button Background="Transparent" BorderBrush="Transparent"> <Button.Content> <StackPanel> <Image Source="xxx.png" /> <TextBlock Text="Change Password" /> </StackPanel> </Button.Content> </Button> When I click the button, it has border like below. I try to create style for FocusVisualStyle of the button but it don't work as I expect, this problem also occur when I set IsDefault="True" too.

    Read the article

  • How can I make a grid of clickable images from a list of data in WPF?

    - by mico
    Hello, I am a seasoned C and Java programmer, but an absolute WPF newbie. I am creating a kiosk application that will display a list of images of products that the user will click to see product details and maybe place an order. I am trying to structure my app with MVVM Foundation because I am used to the benefits of structure and tests. I wonder what is the most natural way to create a grid of clickable images that will fill the screen left to right, top to bottom (or the other way round, I have no exact requirements). Any image should be bound to an object that will become current and be displayed in the next screen. Thanks for your help.

    Read the article

  • Unable to display data in a WPF datagrid that has a DataView instance as the items source

    - by Jimmy W
    I am using a DataGrid object from the WPF toolkit. I am binding the DataGrid object to the default view of a DataTable instance as declared in the following code: WeatherGrid.ItemsSource = weatherDataTable.DefaultView; weatherDataTable has three columns. The first column is defined to contain a string data type. The other two columns are defined to contain double data types. When the application exits the function that calls the binding as expressed in the declaration, The DataGrid object displays data for the first column, but not the other columns. When I type the following in the immediate window in the debugger: ((DataRowView)WeatherGrid.Items[0]).Row[1] I get a number, but this doesn't correspond with what is being displayed. Why is only the first column visible, and how can I get all of the data to be visible? I'll leave my XAML definition for the DataGrid object below: <toolkit:DataGrid Margin="12.726,77.71,12,0" Name="WeatherGrid" Height="500" Grid.Row="1" VerticalAlignment="Top" CanUserAddRows="False" CanUserDeleteRows="False" IsReadOnly="True" />

    Read the article

  • How can I use data binding in WPF to create a new user control for each element in a list?

    - by Joel
    I have a list of objects. For each item in the list, I want to create a new user control bound to that item. From what I've read, doing this programmatically is bad practice with WPF (as well as less than straightforward), so I should use data binding as a solution instead. The problem is, I can't figure out how to do this. I don't know the contents of the list (just the type) at compile-time, so I can't create and bind with XAML for each element. Google and MSDN don't seem to have any answers, so maybe I'm thinking about this the wrong way? What do I need to do? Thanks

    Read the article

  • C#, WPF. Length of string that will fit in a specific width.

    - by Ian
    Hi, I'm sure I'm missing something obvious, I have an area in which I intend to draw text. I know its (the area) height and width. I wish to know how many characters/Words will fit in the width, characters preferably. Second question, If the line is too long I'll want to draw a second line, so I guess I need to get the height of the text as well, including what ever it considers the right vertical padding? I'd also rather like to know the inverse, i.e. how many characters I can fit in a specific width. I assume the fact that WPF isn't constrained to pixels will have some bearing on the answer? Ultimately I'm planning on wrapping text around irregular shaped images embedded in the text. Any pointers in the right direction would be great. Thanks

    Read the article

  • How to determine direction of navigation from IE WebBrowser (IHtmlWindow2 or Javascript)

    - by Geoff Cox
    I'm uisng the WPF Web Browser control and when it fires the Navigating event, the event args always contain NavigationMode.New. It should be set to NavigationMode.Back if the user chooses to 'Go Back' from the web control. So its off to the COM ActiveX control underneath to determine the direction of navigation. I've been looking at IHtmlWindow2 and IHtmlDocument2 and IOmHistory, but don't see anything that happens on navigation to tell me if the navigation is caused by going back, forward, a new address, or a refresh. Since IHtmlWindow and Javascript have the same DOM, maybe someone knows how from Javascript. I've also been looking at the IWebBrowser2 interface, but can't find anything there either. Is there an event or property I need to inspect?

    Read the article

  • How do I render my own DirectX Stuff to a full screen WPF's DirectX surface?

    - by marc40000
    Basically Danny Varod seems to know as he posted it as an answer to this question: Display a Message Box over a Full Screen DirectX application I think, theoretically this might work, but I have no idea how to actually do it. Since I'm also not allowed to post a comment under his comment nor am I allwoed to ask on meta about how to contact another user, I ask this as a normal question here: How do I render my own DirectX Stuff to a full screen WPF's DirectX surface? For starters, I have no idea how to get the DirectX surface from a WPF window. If I had it, what do I have to take care of that the WPF rendering doesn't screw up my own rending or vice-versa?

    Read the article

  • What the best way to wire up Entity Framework database context (model) to ViewModel in MVVM WPF?

    - by hal9k2
    As in the question above: What the best way to wire up Entity Framework database model (context) to viewModel in MVVM (WPF)? I am learning MVVM pattern in WPF, alot of examples shows how to implement model to viewModel, but models in that examples are just simple classes, I want to use MVVM together with entity framework model (base first approach). Whats the best way to wire model to viewModel. Thanks for answers. //ctor of ViewModel public ViewModel() { db = new PackageShipmentDBEntities(); // Entity Framework generated class ListaZBazy = new ObservableCollection<Pack>(db.Packs.Where(w => w.IsSent == false)); } This is my usual ctor of ViewModel, think there is a better way, I was reading about repository pattern, not sure if I can adapt this to WPF MVVM

    Read the article

  • How do I get my custom WPF textbox to fill correctly?

    - by Dan Ryan
    I am trying to create a custom WPF textbox control that extends the standard textbox control but the extended textbox behaves differently when placed in control containers. Within my Window I have a stackpanel with a standard textbox and my extended textbox: <StackPanel Margin="10"> <TextBox Height="21" /> <l:SearchTextBox Search="SearchTextBox_Search" Height="21" Margin="0, 10, 0, 0" SearchMode="Delayed" HorizontalAlignment="Left" /> </StackPanel> The standard textbox stretches the length of the StackPanel whereas the custom textbox does not. How can I get the controls to behave the same? The styling for the custom textbox is shown below: <Style x:Key="{x:Type UIControls:SearchTextBox}" BasedOn="{StaticResource {x:Type TextBox}}" TargetType="{x:Type UIControls:SearchTextBox}"> <Setter Property="Template"> <Setter.Value> <ControlTemplate TargetType="{x:Type UIControls:SearchTextBox}"> <TextBox /> </ControlTemplate> </Setter.Value> </Setter> </Style>

    Read the article

  • WPF - Grid - updating Row and Column number attached properties on child controls each time a new Ro

    - by ig105
    I have a WPF Grid with a XAML similar to this: <Grid width=200 Height=200 > <Grid.ColumnDefinitions > <ColumnDefinition Width="1*" /> <ColumnDefinition Width="2*" /> </Grid.ColumnDefinitions> <Grid.RowDefinitions> <RowDefinition Height="Auto" /> <RowDefinition Height="Auto" /> <RowDefinition Height="Auto" MinHeight="24" /> </Grid.RowDefinitions> <TextBlock Text="Name" Grid.Row="0" Grid.Column="0"/> <TextBox Grid.Row="0" Grid.Column="1" /> <TextBlock Text="Age" Grid.Row="1" Grid.Column="0"/> <TextBox Grid.Row="1" Grid.Column="1" /> </Grid> I need to add a new row in between existing 2 rows of data, but my worry is that when I add a new row, I will need to manually update Grid.Row attached property in each of the controls that appear in rows below the newly added row. Is there a smarter way of doing this? may be to set Row/Column numbers relative to adjacent Rows/Columns ? Cheers.

    Read the article

  • Is it possible to write a class that interacts with controls on my WPF form?

    - by Adam S
    Hi all, I'm trying to write a class that I can use to interact with a group of similar controls in my wpf application. I have hit a few roadblocks and now I am wondering if this is a poor approach to begin with. I want to do this primarily to make my code more manageable - I have to interact with around 200 - 300 controls with my code, and it could get very tricky to have all my code in the main window class. Here's something I'd like to be able to do: class ProcControl { private CheckBox * [] Boxes = new CheckBox[10]; ProcControl() { //set boxes 0-9 to point to the actual checkboxes } //provides mass checking/unchecking functionality public void Refactor(CheckBox box) { //see what box it is int box_index = 0; while (Boxes[box_index] != box) { box_index++; } } } This doesn't work as it is right now. I have not figured out how to get my Boxes[] array to point to the actual checkboxes on my form, so I can't interact with them yet. Is it even possible to make an array that points to a bunch of controls so that I may process their properties in a nice manner? Why can't I access the controls at all from inside my class?

    Read the article

  • WPF: Draw a grid on a Canvas?

    - by stefan.at.wpf
    Hello community, I'm currently trying to add gridlines to a canvas. I need an exact free space between them, where I'd like to place something for hit detection per cell, maybe simply a transparent border or such a thing. While I thought this would be an easy thing, I'm facing problems like antialiasing and that lines in WPF aren't very "calculate" / exact drawing friendly - e.g. if I draw a line on x=20 with a thickness of 10, the line's width goes from x=15 to x=25 (maybe not exactly, just some kind like that), so it takes the given position as middle point - if it would draw from 20 to 30 it would be easier in my case. Besides that making things more complex, how does WPF handle e.g. a thickness of 5? Draw thickness 3 left from the given point and the remaining 2 right from it? Or maybe just the opposite way? Well, just wanted to show you which problems I have, though this all maybe just seems simple to be done. Just wondering if anyone has ever done this before. Currently I find a Border without content and just 2 sites set to a thickness greater than 0 as line seems to work the best in my tests, seems like it's clear where they are drawn and they somehow don't seem to make any antialiasing problems. Just wondering if there's a more intuitive / better way of doing this? I don't want to lay a Canvas over a Grid, I think this maybe makes some things more complex in the end (by the way: how would I place a Canvas on top of a Grid?). Thanks for any hint!

    Read the article

  • How to speed up WPF programs?

    - by Sam
    I love programming with and for Windows Presentation Framework. Mostly I write browser-like apps using WPF and XAML. But what really annoys me is the slowness of WPF. A simple page with only a few controls loads fast enough, but as soon as a page is a teeny weeny bit more complex, like containing a lot of data entry fields, one or two tab controls, and stuff, it gets painful. Loading of such a page can take more than one second. Seconds, indeed, especially on not so fast computers (read: the customers computers) it can take ages. Same with changing values on the page. Everything about the WPF UI is somehow sluggy. This is so mean! They give me this beautiful framework, but make it so excruciatingly slow so I'll have to apologize to our customers all the time! My Question: How do you speed up WPF? How do you profile bottlenecks? How do you deal with the slowness? Since this seems to be an universal problem with WPF, I'm looking for general advice, useful for many situations and problems. Some other related questions: What tools do you use for WPF development Tools to develop WPF or Silverlight applications

    Read the article

  • WPF Memory Leak on XP (CMilChannel, HWND)

    - by vanja.
    My WPF application leaks memory at about 4kb/s. The memory usage in Task Manager climbs constantly until the application crashes with an "Out of Memory" exception. By doing my own research I have found that the problem is discussed here: http://stackoverflow.com/questions/801589/track-down-memory-leak-in-wpf and #8 here: http://blogs.msdn.com/jgoldb/archive/2008/02/04/finding-memory-leaks-in-wpf-based-applications.aspx The problem described is: This is a leak in WPF present in versions of the framework up to and including .NET 3.5 SP1. This occurs because of the way WPF selects which HWND to use to send messages from the render thread to the UI thread. This sample destroys the first HWND created and starts an animation in a new Window. This causes messages sent from the render thread to pile up without being processed, effectively leaking memory. The solution offered is: The workaround is to create a new HwndSource first thing in your App class constructor. This MUST be created before any other HWND is created by WPF. Simply by creating this HwndSource, WPF will use this to send messages from the render thread to the UI thread. This assures all messages will be processed, and that none will leak. But I don't understand the solution! I have a subclass of Application that I am using and I have tried creating a window in that constructor but that has not solved the problem. Following the instructions given literally, it looks like I just need to add this to my Application constructor: new HwndSource(new HwndSourceParameters("MyApplication"));

    Read the article

  • How to implement two way binding between an ActiveX control and a WPF MVVM View Model

    - by Zamboni
    I have a WPF application implemented using the MVVM framework that uses an ActiveX control and I need to keep the WPF and ActiveX UI synchronised. So far I can update the ActiveX UI when I change the WPF UI using the code at the bottom of the question that I got from the article Hosting an ActiveX Control in WPF and this question. But I cannot update the WPF UI when I make a change in the ActiveX UI. I suspect that I need to fire the PropertyChanged event from my ActiveX control but I have no idea how to do this or if it is even possible. The ActiveX controls I have written are in VB6 and MFC as I am just prototying at this time for the eventual integration of VB6 ActiveX controls in a WPF contaner application. Here is a code snipet that indicates the work done so far: System.Windows.Forms.Integration.WindowsFormsHost host = new System.Windows.Forms.Integration.WindowsFormsHost(); // Create the ActiveX control. AxTEXTBOXActiveXLib.AxTEXTBOXActiveX axWmp = new AxTEXTBOXActiveXLib.AxTEXTBOXActiveX(); // Assign the ActiveX control as the host control's child. host.Child = axWmp; axWmp.DataBindings.Add(new System.Windows.Forms.Binding("ActiveXStatus", (MainWindowViewModel)this.DataContext, "ModelStatus", true, DataSourceUpdateMode.OnPropertyChanged )); // Add the interop host control to the Grid // control's collection of child controls. this.activexRow.Children.Add(host); How to implement two way binding between an ActiveX control and a WPF MVVM View Model?

    Read the article

  • WPF XAML references not resolved via myAssembly.GetReferencedAssemblies()

    - by WPF-it
    I have a WPF container application (with ContentControl host) and a containee application (UserControl). Both are oblivious of each other. Only one XML config file holds the string dllpath of the containee's DLL and full namespace name of the ViewModelClass inside the containee. A generic code in container resolves containee's assembly (Assembly.LoadFrom(dllpath)) and creates the viewmodel's instance using Activator.CreateInstance(vmType). when this viewmodel is hosted inside the ContentControl of the container, and relevant vierwmodel specific ResourceDictionary is added to ContentControl.Resources.MergedDictionaries of the content control of container, so the view loads fine. Now my containee has to host the WPF DataGrid using assembly reference of WPFToolkit.dll from my local C:\Lib folder. The Copy Local reference to the WPFToolkit.dll is added to the .csproj file of the containee's project and its only referred in the UserControl.XAML using its XAML namepsace. This way my bin\debug folder in my containee application, gets the WPFToolkit.dll copied. XAML: xmlns:Controls="clr-namespace:Microsoft.Windows.Controls;assembly=WPFToolkit" <Controls:DataGrid ItemsSource="{Binding AssetList}" ... /> Issue: The moment the ViewModel (i.e. the containee's usercontrol) tries to load itself I get this error. "Cannot find type 'Microsoft.Windows.Controls.DataGrid'. The assembly used when compiling might be different than that used when loading and the type is missing." Hence I tried to load the referenced assemblies of the containee's assembly (myAssembly.GetReferencedAssemblies()) before the viewmodel is hosted. But WPFToolkit isnt there in that list of assemblies! Strange thing is I have another dll referred called Logger.dll in the containee codebase but this one is implemented using C# code behind. So I get its reference correctly resolved in myAssembly.GetReferencedAssemblies(). So does that mean BAML references of assemblies are never resolvable by GetReferencedAssemblies?

    Read the article

  • New Oracle.com global navigation

    - by tim.bonnemann
    This is a guest post by Michal Kopec, Senior User Experience Architect her at Oracle Marketing Brand and Creative. We have just refreshed the Oracle.com global navigation to serve you better with Oracle related information and news. Highlights 1. Updated, user-oriented and business information balanced navigational categories. Say hello to the new categories: Downloads, Education and Oracle Technology Network. Oracle Partner Network navigation received a facelift too. 2. Brand new flyout based navigation - mouse over Partners for instance - providing both a high level content overview as well as shortcut links for most popular website destinations 3. Introducing audience based - I'm a... - and - I want to... - task-based navigation. Now you can navigate based on who you are or what is you want to accomplish. Please note this is an initial step - we want to build out those based on your opinions and feedback. 4. Adjusted Oracle Technology Network horizontal navigation to match Oracle.com. Oracle Technology Network users can now benefit from OTN content being accessible from anywhere during their Oracle.com and OTN visits of course :) 5. Last but not least - we applied the same refreshed global navigation to a couple of country sites - starting with Oracle Brazil and Oracle China. More to come. The project internal code name is Mosaic. It is an effort to provide you with unified user and brand experience during your Oracle websites visit. Every time you hear Mosaic expect great things to happen. With that - please let us know what you think. We value your opinion.

    Read the article

  • Silverlight Navigation using Mvvm-light(oobe)+MEF?

    - by deliberative assembly
    What is the best approach for navigating between UserControls/Pages(out of browser experience)? I'm fairly new to Silverlight and even newer to the mvvm pattern. How well does the Navigation Framework Integrate with the MVVM Light Toolkit? A snippet for general application flow control with the two would be great. The plan was to use the Navigation Framework for general flow or using Jeremy Likeness's approach to region management(http://csharperimage.jeremylikness.com/search/label/regions) and swapping out regions as needed. I've seen a few places mention replacing the Visual Root, but that sounded like a hack to me. Any advice, snippets, or a nudge in the general direction would be greatly appreciated. Thank you.

    Read the article

  • Single Page Navigation w/ Javascript and Back Button

    - by Khan
    Ok, so I have a "navigation" div and "content" div. When something on the navigation is clicked, I fade in the content div with the new data. Now, I would like to have the old data returned when the user hits the "back" button on his/her browser, but I'm having a hard time doing this. I know I can set the content to be a named anchor, so they stay on the same page with a breadcrumb trail. However, that's as far as I get. Can I listen for a back button click? Can I set content to display when a certain anchor name is reached? Thanks in advance for your help, SO.

    Read the article

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