Search Results

Search found 1226 results on 50 pages for 'kendo mvvm'.

Page 41/50 | < Previous Page | 37 38 39 40 41 42 43 44 45 46 47 48  | Next Page >

  • IoC and Design Time

    - by benPearce
    I have a WPF application which I am using to learn MVVM and IoC. The problem is that the Model used by one of the Views expects to pull one of its dependancies in the constructor from an IoC container. When working on this View in the Visual Studio designer it cannot show the design because an exception is being raised in the model. Is there a way around this? Am I pulling my dependancies in the wrong place in code or is there a way I can pass in constructed dependancies, perhaps through Constructor injection. At present the IoC container is setup in code in App.xaml.cs. The IoC container is a roll-your-own taken from this article on MSDN - http://msdn.microsoft.com/en-us/magazine/cc337885.aspx

    Read the article

  • What is a good pattern for binding a collection of objects coming from WCF, in Silverlight?

    - by Krishna
    Hi there, I've got a question about a Silverlight WCF Databinding pattern: There are many examples about how to bind data using {Binding} expressions in XAML, how to make async calls to a WCF service, set the DataContext property of a element in the UI, how to use ObservableCollections and INotifyPropertyChanged, INotifyCollectionChanged and so on. Background: I'm using the MVVM pattern, and have a Silverlight ItemsControl, whose ItemsSource is set to an ObservableCollection property on my ViewModel object. My view is of course the XAML which has the {Binding}. Say the model object is called 'Metric'. My ViewModel periodically makes calls to a WCF service that returns ObservableCollection. MetricInfo is the data transfer object (DTO). My question is two-fold: Is there any way to avoid copying each property of MetricInfo to the model class - Metric? When the WCF calls completes, is there any way to make sure I sync the items which are in both my local ObservableCollection and the result of the WCF call - without having to first clear out all the items in the local collection and then add all the ones from the WCF call result? thanks, Krishna

    Read the article

  • Silverlight authentication during startup - how to mimic syncronous behavior?

    - by jkohlhepp
    I have a Silverlight app that is using the MVVM pattern. I have a WCF service which will allow me to authenticate users (I don't have direct control over that service - assume it is a black box that just returns me the user info and a list of privileges the user has). So, when the app starts up, I want to pull security data from that service. Right now, when I do this, my views and view models can end up getting initialized before the service returns with the security data. This causes problems because the view models need to disable buttons and make things visible/invisible based on the user having certain privileges. Is there a pattern that allows me to prevent the initialization of the views / view models until the WCF call has returned? How would you go about solving this problem as elegantly as possible?

    Read the article

  • Winforms Which Design Pattern / Agile Methodology to choose

    - by ZedBee
    I have developed desktop (winforms) applications without following any proper design pattern or agile methodologies. Now I have been given the task to re-write an existing ERP application in C# (Winforms). I have been reading about Domain Driven Design, scrum, extreme programming, layered architecture etc. Its quite confusing and really hard (because of time limitations) to go and try each and every method and then deciding which way to go. Its very hard for me to understand the bigger picture and see which pattern and agile methodology to follow. To be more specific about what I want to know is that: Is it possible to follow Domain Driven Design and still be agile. Should I choose Extreme programming or scrum in this specific scenario Where does MVP and MVVM fits, which one would be a better option for me

    Read the article

  • Silverlight 4 RIA does not return anything using DomainContext

    - by Savvas Sopiadis
    Hi everybody! Just learning Silverlight 4/RIA and i 'm stuck in a weird problem: setup an ASP.NET MVC project as the project hosting the Domain service. In this i tried to get data from the Domain Service which worked fine (i'm using a repository in it). Now i tried to setup a SL4 project. I though i do it the MVVM-way, so i decided to setup a ViewModel Class with the following code: public class ViewModel { OrganizationDomainContext dsCtxt = new OrganizationDomainContext(); public ViewModel() { EntityQuery<Culture> query = from cu in dsCtxt.GetAllCulturesQuery() select cu; LoadOperation<Culture> lo = dsCtxt.Load(query); } } The crazy thing about this is .. it doesn't return anything!!! What am i missing here? Thanks in advance

    Read the article

  • What WPF frameworks should I use?

    - by joebeazelman
    I'm a newbie to WPF and I'm developing a brand new windows desktop application and I would like your opinion on what WPF framework I should use. I know this question has been asked before, but the last question was asked at least several months ago. A lot has changed since then. Right now, I'm using MVVM Light which is more of a library than an actual framework, as the name suggests. I’m looking for something more comprehensive. I prefer a framework that I can use on future WPF projects. Consequently, it should be general purpose and productive. Any insights or suggestions?

    Read the article

  • Implementing a Property Inspector/Editor in WPF

    - by Schneider
    So far my plan is to have an event "Item selected" which the property inspector listens to. The actual property inspector is just a ContentControl. When the object is selected the content property is set and the appropriate DataTemplate for editing the object is loaded. In general I am trying to do this "MVVM" style. I guess you could use reflection instead of templating but I only have a handful of types so far. Has anyone implemented something similar? Can you offer any advice or source code?

    Read the article

  • Search and Highlight search text in items in the Listview in WPF

    - by kiran-k
    Hi, I am using MVVM to show the database records in a gridview (ListView view). i have a textbox where we can enter the text to be searched in the results listed in the gridview. i tried many ways to highlight the search text (Not the entire row only the text matches in the record) in the records displayed in the list view but unable to highlight. i am able to find the starting and ending indexes. i tried to created rectangles using those indexes on the text block but unable to highlight. Can anyone have solution for this. Thanks in advance.

    Read the article

  • Three Silverlight 4 issues

    - by Muhammad Jamal Shaikh
    Silverlight version : 4 Silverlight patter :MVVM Visual Studio template :Silverlight navigation application How do I block main navigation on (mainpage.xaml) as in any silverlight navigation application and block page's controls ( i.e whichever page is it in ) during async webservice calls? Any best practices? How do I deal with the browser's forward and backward buttons, specially during async calls? How do I deal with dialogs on the views ( e.g when using a childwindow to select a color). How should the color's picker control hex be communicated to the viewmodel?

    Read the article

  • Change notification in EF EntityCollection

    - by Savvas Sopiadis
    Hi everybody! In a Silverlight 4 proj i'm using WCF RIA services, MVVM principles and EF 4. I 'm running into this situation: created an entity called Category and another one called CategoryLocale (automated using VS, no POCO). The relation between them is 1 to N respectively (one Category can have many CategoryLocales), so trough this relationship one can implement master-detail scenarios. Everytime i change a property in the master record (Category) i get a notifypropertychanged notification raised. But: whenever i change a property in the detail (CategoryLocales) i don't get anything raised. The detail part is bound to a Datagrid like this: <sdk:DataGrid Grid.Row="3" Grid.ColumnSpan="2" ItemsSource="{Binding SelectedRecord.CategoryLocales,Mode=TwoWay}" AutoGenerateColumns="False" VerticalScrollBarVisibility="Auto" > Any help is appreciated! Thanks in advance

    Read the article

  • WPF ListView.CurrentChanged too fast for binding

    - by matt
    My case: MVVM ListView+Details(custom UserControl) List bound to MV.Items (IsSynchronizedWithCurrent=true) Details bound to MV.Items.Current MV.Items.Count == 100 about 0.2sec to read details (lazy mode) When I hold the down arrow on the list, very strange things happen: list items order change current changes in the random order CPU usage drastically increments and eventually all hangs. I've read some post that one should start the timer or run handler in the background, but I am not able to do that, since all the binding WPF does for me. Is there some way to instruct the binding in my DetailsControl, to wait a while before accepting CurrentItem? Or should I just resign from the clean solution and write custom code in my MV to handle that?

    Read the article

  • how to bind the click event of a button and the selecteditemchanged of a listbox to a viewmodel in m

    - by Michel
    Hi, i'm just starting with the mvvm model in Silverlight. In step 1 i got a listbox bound to my viewmodel, but now i want to propagate a click in a button and a selecteditemchanged of the listbox back to the viewmodel. I guess i have to bind the click event of the button and the selecteditemchanged of the listbox to 2 methods in my viewmodel somehow? For the selecteditemchanged of the listbox i think there must also be a 'return call' possible when the viewmodel tries to set the selecteditem to another value? i come from a asp.net (mvc) background, but can't figure out how to do it in silverlight.

    Read the article

  • Design from scratch - building classes

    - by Tony
    Hi All, I've started a new project where I'm writing a WPF business application, but I'm having trouble with the design. The database was easy to put together, but I'm not sure how I have to go about the designing the application itself. The main thing that I find hard is the code design. I've decided that the MVVM pattern is very applicable for this application, but how do I go about deciding what classes to build and how things go from there? Does anyone have some guidelines I could use? This is a standard business application that just stores and retrieves data. Some data queries will also need to be performed.

    Read the article

  • Binding to 'To' In Storyboard

    - by Peanut
    I'll try to make this as simple as I can. I want to do this: <Storyboard x:Name="MoveToLocation"> <DoubleAnimation Duration="0:0:0.5" To="{Binding X}" Storyboard.TargetProperty="(UIElement.RenderTransform).(CompositeTransform.TranslateX)" Storyboard.TargetName="grid" d:IsOptimized="True"/> </Storyboard> As you may have noticed the Binding on 'To' Property does not work. It seems to only accept static values. How does one do this animation with MVVM? I cant just put in static data, cause it's going to change. Thanks.

    Read the article

  • WPF - Binding a variable in an already bound ListBox?

    - by Corey Ogburn
    I really don't know how to title this question, but I need some help with binding to a ListBox. I have an object, that contains (among other information) 2 properties that need to be bound in one ListBox. One of these is an ObservableCollection of objects, called Layers, and the other property holds an enum value of either Point, Line or Polygon, called SpatialType. These are to act as a legend to a map application. I have bound Layers to a ListBox, no problem, but inside the ListBox.ItemTemplate, I need to bind the single variable SpatialType to every Item in the ListBox. The problem I'm running into is that when I try to bind while inside the ListBox, the only variables I have access to are the properties of each Layer and I can't access any properties of the original bound class that holds the Layers (and the needed SpatialType property). What can I do to get that piece of information bound inside the ItemTemplate without messing up a good MVVM architecture?

    Read the article

  • Expand in linq not loading inner data collections from service.

    - by Kit
    I am seeing odd behavior with service queries! I am using MVVM pattern for a silverlight 3 app on 3.5 framework and Dataservices 1.5. The following code eager loads correctly the parent object and the child heirarchy perfectly IF and ONLY IF I am preloading the data. But I would like to fetch a different set of the parent object (and its child heirarchy) on different button clicks. What I am seeing is that on button click, only the parent object is retrieved, and the child heirarchy contains nothing. Any suggestions? Any ideas how to tackle this? Thanks all. The method: DataServiceQuery serviceQuery = (DataServiceQuery)(from m1 in dbEntities.gis_Region.Expand("gis_RegionValue/gis_Measure") where m1.RegionGuid == new Guid(regionGuid) select m1); serviceQuery.BeginExecute(GetRegionDetailAsyncResult, serviceQuery); The wired Async Result: DataServiceQuery query = (DataServiceQuery)result.AsyncState; gis_Region region = query.EndExecute(result).First();

    Read the article

  • Problem showing selected value of combobox when it is bind to a List<T> using Linq to Entities

    - by Syed Mustehsan Ikram
    I have a combobox which is has itemtemplate applied on it and is bind to a List of entity return using linq. i m using mvvm. It is bind to it successfully but when i set the selected value of it from code at runtime to show the selected value coming from db it doesn't select it. For reference here is my combobox xaml. SelectedValue="{Binding Path=SelectedManufacturer}" Grid.Column="3" Grid.Row="2" Margin="20,9.25,68,7.75" ItemTemplate="{StaticResource ManufacturerDataTemplate}" TabIndex="6"/ Here is my part from code behind from viewModel. List currentManufacturers = new List(); tblManufacturer selectedManufacturer = null; public List CurrentManufacturers { get { return currentManufacturers; } set { currentManufacturers = value; NotifyPropertyChanged("CurrentManufacturers"); } } public tblManufacturer SelectedManufacturer { get { return selectedManufacturer; } set { selectedManufacturer = currentManufacturers.Where(mm => mm.ManufacturerID == Convert.ToInt32(selectedDevice.tblManufacturer.EntityKey.EntityKeyValues[0].Value)).First(); NotifyPropertyChanged("SelectedManufacturer"); } }

    Read the article

  • Control margins of an automatically generated content presenter in Windows Phone Panorama Control

    - by Maxim V. Pavlov
    I am building an MVVM Panorama Windows Phone 7 application. At some point of Panorama Item's layout I get a bottom margin of a panorama header box, that moves my content too far down. Is there a way I can set a bottom margin of a ContentPresenter, that is generated to hold the controls, defined in the Panorama.HeaderTemplate? Here is my layout list in Silverlight Spy: In case the screen shot is not readable, here is a large version: http://bit.ly/rBvNp8 Something generates a 26 points bottom margin for a header box (probably the control's code, that handles a layout). How can I control this value? I need it to be set to 0.

    Read the article

  • silverlight drag move delta

    - by Notter
    Hi, this should be pretty simple, but i forgot how to do it... I've got a Border on a canvas, and i want to be able to move it around. i could do this easily with the MouseDragElementBehavior. but i don't want smooth movment, i want to to jump on the Y axis in an offset of 30. and on the X in 193. And it's done in MVVM, so i guess i should implement it as a behavior, right? anyway, how do i do this?

    Read the article

  • How to make WPF Listview works same as Photoshop layer

    - by Youngjae
    As we can see in Photoshop layer window (or other image editting tool also), it has several features: groups with folder-like header (collapse/expandable) ungroupped item (no header) sort "manually" by dragging. In case of No 1, I made groupped item with expander control. (ref: http://www.dotnetspark.com/kb/1753-expand-and-collapse-listbox-group-header.aspx) In case of No 3, Sort manually can be solved with this code. (ref: codeproject.com/kb/WPF/ListViewDragDropManager.aspx) but I don't know how to list ungroupped items together. Of course, the ungroupped items may not have a header. I am using ICollectionView and MVVM. Does ICollectionView can make it?

    Read the article

  • How to restrict special symbols like % in textbox in wpf?

    - by Vamsy
    I would like to develop a textbox which restricts special symbols like %. I used textbox's keydown event to restrict '%' . I already used the code as if(Keyboard.Modifiers == ModifierKeys.Shift && e.key == key.D5) { e.handle=true; return; } when i implement this in mvvm architecture, I got problem with the dependency property that recognizes only shift as one key and D5 as another when I converted systemkey into string format. How can I recognize % symbol?

    Read the article

  • How to organize architecture WPF project?

    - by Dmitriy
    Hello! In my WPF project i want to have only one Window - MainWindow and UserControls as working part. I have some little different applications in one, and want to make navigation on top of my MainWindow as buttons. And little applications as UserControl. In MainWindow - grid with Big Empty Zone - which use to keep and run work. But, i want to navigate to other userControl from another. (probably do not understand :() How organize architecture WPF project that: one main window and many usercontrols which places in mainwindow and replace each other in turn. and there is the possibility of navigating from another usercontrol to another. May be it's MVVM, but i don't understand how this pattern can help me.

    Read the article

  • When should I use adorners?

    - by Francesco
    Hi all! WPF is great because there are many things to achieve own goals. By example, for what I understand, adorners can add some controls to a UI element, but I think that the same behavior can be achieved through a custom control that contains the additional element. So, my question is: when should I prefer adorners to a more complex (but I think, more flexible) custom control? Please consider that I'm extensively using MVVM pattern and I would like to bind commands to the additional element. Particularly, I'm designing a diagram designer application and I would like to add connection points to my shapes. Thank you

    Read the article

  • C# Event routing in code behind

    - by Nate
    I'm building a WPF MVVM-ish application. I want to be able to display an event log containing items in a collection that exists in my viewmodel. I want any of the objects in the model to be able to add data to the event log. Therefore every object needs to be able to pass data back to one central collection for databinding in the view. I could implement an event in every one of my data classes and manually pass the events up the object heirarchy but this seems super clumsy. On the visual tree a Routed Event would take care of this, is there some equivelent in the model scope? Any other ideas?

    Read the article

  • How to pass a value between Silverlight pages for WP7?

    - by Sebastian Gray
    I've got a MainPage.xaml page a Detail.xaml page. I've passed variables to the Detail.xaml from MainPage.xaml by using a static variable and referencing it in Detail.xaml (the detail page is acting like a dialog). However once I've updated the content of another object, I want to call a method in MainPage.xaml to refresh the content of that page using the updated object from the Detail.xaml page. I assume I am not using the correct paradigm for this and should probably be using MVVM or something but I'm not familiar with the implementation and was hoping there was a simple way to do this?

    Read the article

< Previous Page | 37 38 39 40 41 42 43 44 45 46 47 48  | Next Page >