Search Results

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

Page 28/50 | < Previous Page | 24 25 26 27 28 29 30 31 32 33 34 35  | Next Page >

  • Pattern for sharing data between views (MVP or MVVM)

    - by Dovix
    What is a good pattern for sharing data between related views?. I have an application where 1 form contains many small views, each views behaves independently from each other more or less (they communicate/interact via an event bus). Every so often I need to pass the same objects to the child views. Sometimes I need this same object to be passed to a child view and then the child passes it onto another child itself contains. What is a good approach to sharing this data between all the views contained within the parent form (view) ? I have looked into CAB and their approach and every "view" has a "root work item" this work item has dictionary that contains a shared "state" between the views that are contained. Is this the best approach? just a shared dictionary all the views under a root view can access? My current approach right now is to have a function on the view that allows one to set the object for that view. Something like view.SetCustomer(Customer c); then if the view contains a child view it knows to set it on the child view ala: this.childview1.SetCustomer(c); The application is written in C# 3.5, for winforms using MVP with structure map as a IoC/DI provider.

    Read the article

  • Null Reference Exception on MVVM pattern

    - by Mohit Deshpande
    System.NullReferenceException Object reference not set to an instance of an object. at Microsoft.Windows.Design.DocumentModel.Trees.MarkupDocumentTreeManager.<FindMarkupNodePath>d__0.MoveNext() at System.Linq.Enumerable.FirstOrDefault[TSource](IEnumerable1 source) at MS.Internal.Services.DocumentInformationServiceImpl.get_Root() at MS.Internal.Designer.VSDesigner.Load() at MS.Internal.Designer.VSIsolatedDesigner.VSIsolatedView.Load() at MS.Internal.Designer.VSIsolatedDesigner.VSIsolatedDesignerFactory.Load(IsolatedView view) at MS.Internal.Host.Isolation.IsolatedDesigner.BootstrapProxy.LoadDesigner(IsolatedDesignerFactory factory, IsolatedView view) at MS.Internal.Host.Isolation.IsolatedDesigner.BootstrapProxy.LoadDesigner(IsolatedDesignerFactory factory, IsolatedView view) at MS.Internal.Host.Isolation.IsolatedDesigner.Load() at MS.Internal.Designer.DesignerPane.LoadDesignerView() I keep getting this exception and then intellisense stops working in a XAML text editor. Any ideas why?

    Read the article

  • how to profile silverlight mvvm application with a lot of custom controls

    - by tomo
    There is a quite big LOB silverlight application and we wrote a lot of custom controls which are rather heavy in drawing. All data is loaded by RIA service, processed and bound (using INofityPropertyChanged interface) to the view. The problem is that first drawing takes a lot time. Following calls to the service (server) and redrawing is quite fast. I used Equatec profiler to track the problem. I saw that processing takes a couple of miliseconds only so my idea is that the drawing by SL engine is slow. I'm wondering if it is possible to profile somehow processes inside SL to check which drawing operations are taking too much time. Are there any guidelines how to implement faster drawing of complex custom controls?

    Read the article

  • MVVM and Ribbon Command

    - by user312372
    I am trying to change the source property of the frame in Page1.xaml when the SampleCommand is excecuted. How do I acheive this in the View Model? Page1.xaml: <r:RibbonTab.Groups> <r:RibbonGroup GroupSizeDefinitions="{StaticResource RibbonLayout}"> <r:RibbonGroup.Command> <r:RibbonCommand LabelTitle="RibbonButton"/> </r:RibbonGroup.Command> <r:RibbonButton x:Name="RibbonButton1" Command="{Binding Path=SampleCommand}"/> </r:RibbonGroup> </r:RibbonTab.Groups> </r:RibbonTab> </r:Ribbon> <Border Name="PageBorder" Grid.Row="0" Grid.Column="1"> <Frame Name="pageFrame" Source="FirstPage.xaml" /> </Border> </DockPanel> c# Page1ViewModel.cs: RelayCommand _sampleCommand; public ICommand SampleCommand { get { // create command ?? return _sampleCommand } page1.xaml.cs : Page1ViewModel pageViewModel; this.DataContext = pageViewModel; // when pageloads

    Read the article

  • Implementing auto-save in WPF / MVVM / NHibernate

    - by Echiban
    My client likes programs like Microsoft OneNote where changes are saved automatically, and he can choose to discard when he explicitly wants to do so. I will have to implement some undo functionality, but I'll figure that out some other time. With NHibernate, I suppose I can call ISession.Update on every single property / binding change, but I can see real pain with this approach down the road. I am not a fan of timers, but maybe a 5 second timer that starts on property / binding change and at timer end use BackgroundWorker thread to save to db. What do you think?

    Read the article

  • Help getting MVVM ViewModel to bind to the View

    - by cw
    Okay guys, I'm new to this model and Silverlight in general. I have the following code (changed object names, so syntax/spelling errors ignore). public class ViewModel { ViewModelSource m_vSource; public ViewModel(IViewModelSource source) { m_vSource= source; m_vSource.ItemArrived += new Action<Item>(m_vSource_ItemArrived); } void m_vSource_ItemArrived(Item obj) { Title = obj.Title; Subitems = obj.items; Description = obj.Description; } public void GetFeed(string serviceUrl) { m_vFeedSource.GetFeed(serviceUrl); } public string Title { get; set; } public IEnumerable<Subitems> Subitems { get; set; } public string Description { get; set; } } Here is the code I have in my page's codebehind. ViewModel m_vViewModel; public MainPage() { InitializeComponent(); m_vViewModel = new ViewModel(new ViewModelSource()); this.Loaded += new RoutedEventHandler(MainPage_Loaded); this.DataContext = m_vViewModel; } void MainPage_Loaded(object sender, RoutedEventArgs e) { m_vViewModel.GetItems("http://www.myserviceurl.com"); } Finally, here is a sample of what my xaml looks like. <!--TitleGrid is the name of the application and page title--> <Grid x:Name="TitleGrid" Grid.Row="0"> <TextBlock Text="My Super Title" x:Name="textBlockPageTitle" Style="{StaticResource PhoneTextPageTitle1Style}"/> <TextBlock Text="{Binding Path=Title}" x:Name="textBlockListTitle" Style="{StaticResource PhoneTextPageTitle2Style}"/> </Grid> I know I'm missing something, but I'm just not knowledgable enough which is why I'm asking you guys :) Is there anything I'm doing wrong here? Thanks!

    Read the article

  • MVVM Light is too fast :)

    - by Hikari
    Hello, I have a simple WM7 Page with textbox. Futher, I assigned EventToCommand (RelayCommand) to this textbox, reacting to TextChanged event. For testing pourposes I made additional method TextBox_TextChanged in page's code behing. Both command and TextBox_TextChanged print a message box with the textbox content. Initial value of textbox is ABC. Then I press D and: 1) TextBox_TextChanged prints ABCD. 2) Command prints ABC. D is missing. Why commands is so fast???

    Read the article

  • Binding between Usercontrol with listbox and parent control (MVVM)

    - by walkor
    I have a UserControl which contains a listbox and few buttons. <UserControl x:Class="ItemControls.ListBoxControl" xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation" xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml" xmlns:d="http://schemas.microsoft.com/expression/blend/2008" xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"> <Grid> <ListBox:ExtendedListBox SelectionMode="Single" ItemsSource="{Binding LBItems}" Height="184"> <ListBox.ItemTemplate> <DataTemplate> <CheckBox Content="{Binding}"/> </DataTemplate> </ListBox.ItemTemplate> </ListBox> <Button Command="RemoveCommand"/> </Grid> </UserControl> And the code behind: public static readonly DependencyProperty RemoveCommandProperty = DependencyProperty.Register("RemoveCommand", typeof(ICommand), typeof(ListBoxControl), null); public ICommand RemoveCommand { get { return (ICommand)GetValue(RemoveCommandProperty); } set { SetValue(RemoveCommandProperty, value); } } public static readonly DependencyProperty LBItemsProperty = DependencyProperty.Register("LBItems", typeof(IEnumerable), typeof(ListBoxControl), null); public IEnumerable LBItems { get { return (IEnumerable)GetValue(LBItemsProperty); } set { SetValue(LBItemsProperty, value); } } I'm using this control in the view like this: <ItemControls:ListBoxControl Height="240" Width="350" LBItems="{Binding Items, Converter={StaticResource ItemsConverter}, Mode=TwoWay}" RemoveCommand="{Binding RemoveCommand}"/> The command works fine, though the listbox binding doesn't. My question is - WHY?

    Read the article

  • Concrete examples of state sharing between multiple viewmodels (WPF MVVM)

    - by JohnMetta
    I have a WPF/Entity Framework (4.0) project with many objects. I'd like to build the application so that that I can have object selection state shared across viewmodels. For Example: We have Cars, Drivers, Passengers, and Cargo classes. We also have UserControls for CarList, DriverList, etc. and editor windows for CarEditor, DriverEditor, etc. Furthermore, we have viewmodels for all of these (CarListViewModel, DriverListViewModel, CargoEditorViewModel, etc). This all composes a dockable interface where the user can have multiple object lists, editors, and viewers open. What I want is a concrete code example of how to wireup multiple viewmodels so that selecting a car in the CarList will cause that car to go live in the CarEditorView, but also be selected in any other view for which the context is valid (such as a DriverByCarView- or just DriverList if there is a filter predicate). There are a number of suggestions and discussions based on this question. The two methods that seem to dominate are: 3018307: Discusses state sharing by mentioning a messaging subsystem 1159035: Discusses state sharing by using an enclosing viewmodel Is one of these approaches better than the other? Does anyone have a concrete example of either/both of these methods in the form of a write-up or small code project? I'm still learning WPF, so pointers to entry points for reading API fundamentals are appreciated, but looking at code examples is where I usually go. Thanks In case anyone is interested, here are some other similar discussions: 3816961: Discusses returning multiple viewmodels depending on object type (i.e. a collection of arbitrary types adhering to a specific interface) 1928130: Discusses whether it is a good idea to aggregate viewmodels as properties of other viewmodels (e.g. a MainWindow viewmodel composed of panel viewmodels) 1120061: Essentially discusses whether to have use a viewmodel-per-model strategy or a viewmodel-per-view-element strategy. 4244222: Discusses whether or not to nest the viewmodels when using a nested object hierarchy. 4429708: Discusses sharing collections between viewmodels directly, but doesn't go into detail. List item: Discusses managing multiple selections within a single viewmodel.

    Read the article

  • Sample code and slides for my TechDays10 (Belgium) talks

    - by Laurent Bugnion
    The source code for my MVVM talk titled “Understanding the MVVM Pattern” given at TechDays 2010 in Antwerpen, Belgium, is available online. It is actually the same code than the MIX10 one, but I added the Windows Phone 7 MVVM Light application (available in the folder titled “Mix10.MvvmDemo2-End”. Note: before unpacking the zip file, you should right click on it, and select properties / Unblock. I also published the slides for my two talks: Understanding the MVVM Pattern A day in the life of a WPF/SL integrator As far as I know, the videos will be online soon, stay tuned and I will announce when it is the case. Get Started page for the MVVM Light Toolkit: http://www.galasoft.ch/mvvm/getstarted   Laurent Bugnion (GalaSoft) Subscribe | Twitter | Facebook | Flickr | LinkedIn

    Read the article

  • Oredev 2012: Summary and source code

    - by Laurent Bugnion
    This week, I had the pleasure to be invited to talk at Oredev, a really cool conference taking place in Malmo, Sweden. The whole event is awesome, including a very special dinner on Monday including sauna and swimming in a 6 degrees cold Baltic sea, and a reception with dinner at the town hall, including the mayor himself. Considering Malmo is a town of 300'000 inhabitants, it is a pretty nice occasion and the historical building itself is really worth seeing. For those interested, I placed my pictures on my Flickr account. I had a workshop on Tuesday morning about Windows 8 development with XAML/C#, and then a session on Wednesday about MVVM in Windows Phone 8 and Windows 8, of course using MVVM Light. I was very nervous because I reworked some of my demos as recently as this morning, in the wake of the Build conference last week and the release of both the Windows Phone SDK and MVVM Light V4.1. Everything went well however, and if I judge by the people I talked t after the talk, and Twitter, everything went pretty well. Before my talk on Tuesday, I had the pleasure to see a talk by Iris Classon (@irisclasson) on the challenges of being a "n00b" and a woman in software development. I especially appreciated her research and conclusions on the lack of women I our industry, a topic that is dear to my heart (because I want the best possible future for my two daughters, and also because I really enjoy working with women on projects, and getting a different insight on the art of software development. I really want to thank the excellent organization committee for their hard work and their fantastic welcome to Malmo. In particular Emily Holweck did a wonderful job and was super helpful throughout the preparation and the conference itself. I made a few pictures during my stay, all with the new Nokia Lumia 920, and hope you will enjoy them too. The source code and the slides… The source code is available for download from Skydrive. You will find the following: Windows 8 workshop slides. MVVM Applied slides Source code package with Win8Demo: The demo I built during the 4 hours workshop, with some light MVVM, web services (JSON), GridView, Design time data (Blend / Visual Studio designer), Bing maps integration, location sensor, Search pane integration. SemanticZoomSample: a sample I put together to demonstrate the SemanticZoom control, with two GridViews and of course full design time data for Blend work. Due to time constraints, I was not able to show this demo during the workshop, but I publish it anyway, hoping it will be useful to someone. PictureUploader: The demo I built during my 50 minutes session about MVVM Applied in Windows Phone 8 and Windows 8. Code sharing, design time data, MVVM Light are used in Windows Phone 8 and Windows 8 apps. And in video… You can also see the video of my MVVM talk thanks to the good services of the Oredev team! MVVM Applied in Windows Phone and Windows 8 from Øredev Conference on Vimeo.   Laurent Bugnion (GalaSoft) Subscribe | Twitter | Facebook | Flickr | LinkedIn

    Read the article

  • #mvvmlight V4 update for Win8 RTM

    - by Laurent Bugnion
    With Windows 8 RTM out of the doors (at least for some of us), it was also time to create an update to MVVM Light. I selected the V4 RTM to do this (V4.0.23).This RTM version was released a few weeks ago with no much bells and whistles because I was just too busy to write much about it. Now after some vacation, I will resume blogging on all my favorite topics including of course MVVM Light. Upgrade Upgrading the installations should not require an ununistall, so try to simply run the MSI downloaded from the Download section at http://mvvmlight.codeplex.com/. Should you encounter any issue, try to uninstall the old version first following the steps at http://galasoft.ch/mvvm/cleaning/. Upgrading current apps from Win8 RP to Win8 RTM I didn’t recompile the assemblies of MVVM Light, so if you had a version running with V4.0.23 on Windows 8 RP, you should be able to use the same DLLs on Windows 8 RTM. If you were using earlier versions however, I would recommend doing an upgrade. I noticed a warning regarding the signing certificate. It is due to the PFX key which appears to be outdated after the upgrade to Windows 8 RTM. I solved this warning by replacing the old PFX key with a new one I copied from a new project. The warning did not cause the build to fail though. About MVVM Light V4 RTM The RTM is finalizing quite a lot of issues. The change log is available at http://galasoft.ch/mvvm/installing/changes/. There are some issues that are either still open or that popped up since then, and I am working on V4.1 to be released in the next few weeks. In addition to that, I have plans to support Windows Phone 8 (when it comes) and have a nice list of ideas for V5 with a few new components. Thanks again for your continuous support of MVVM Light! Laurent   Laurent Bugnion (GalaSoft) Subscribe | Twitter | Facebook | Flickr | LinkedIn

    Read the article

  • Fixing the #mvvmlight code snippets in Visual Studio 11

    - by Laurent Bugnion
    If you installed the latest MVVM Light version for Windows 8, you may encounter an issue where code snippets are not displayed correctly in the Intellisense popup. I am working on a fix, but for now here is how you can solve the issue manually. The code snippets MVVM Light, when installed correctly, will install a set of code snippets that are very useful to allow you to type less code. As I use to say, code is where bugs are, so you want to type as little of that as possible ;) With code snippets, you can easily auto-insert segments of code and easily replace the keywords where needed. For instance, every coder who uses MVVM as his favorite UI pattern for XAML based development is used to the INotifyPropertyChanged implementation, and how boring it can be to type these “observable properties”. Obviously a good fix would be something like an “Observable” attribute, but that is not supported in the language or the framework for the moment. Another fix involves “IL weaving”, which is a post-build operation modifying the generate IL code and inserting the “RaisePropertyChanged” instruction. I admire the invention of those who developed that, but it feels a bit too much like magic to me. I prefer more “down to earth” solutions, and thus I use the code snippets. Fixing the issue Normally, you should see the code snippets in Intellisense when you position your cursor in a C# file and type mvvm. All MVVM Light snippets start with these 4 letters. Normal MVVM Light code snippets However, in Windows 8 CP, there is an issue that prevents them to appear correctly, so you won’t see them in the Intellisense windows. To restore that, follow the steps: In Visual Studio 11, open the menu Tools, Code Snippets Manager. In the combobox, select Visual C#. Press Add… Navigate to C:\Program Files (x86)\Laurent Bugnion (GalaSoft)\Mvvm Light Toolkit\SnippetsWin8 and select the CSharp folder. Press Select Folder. Press OK to close the Code Snippets Manager. Now if you type mvvm in a C# file, you should see the snippets in your Intellisense window. Cheers Laurent   Laurent Bugnion (GalaSoft) Subscribe | Twitter | Facebook | Flickr | LinkedIn

    Read the article

  • Model value not being set on return from View to Controller

    - by sagesky36
    I have a boolean model variable who's value is supposed to be set to TRUE in order to perform a process on return back into the Controller. It works absolutely fine on my local machine, but not on the remote web server. Can somebody PLEASE inform me what I am missing? Below is the "proof of the pudding": The boolean value in quesion is "ShouldGeneratePdf"; MODEL: namespace PDFConverterModel.ViewModels { public partial class ViewModelTemplate_Guarantors { public ViewModelTemplate_Guarantors() { Templates = new List<PDFTemplate>(); Guarantors = new List<tGuarantor>(); } public int SelectedTemplateId { get; set; } public List<PDFTemplate> Templates { get; set; } public int SelectedGuarantorId { get; set; } public List<tGuarantor> Guarantors { get; set; } public string LoanId { get; set; } public string DepartmentId { get; set; } public bool isRepeat { get; set; } public string ddlDept { get; set; } public string SelectedDeptText { get; set; } public string LoanTypeId { get; set; } public string LoanType { get; set; } public string Error { get; set; } public string ErrorT { get; set; } public string ErrorG { get; set; } public bool ShowGeneratePDFBtn { get; set; } public bool ShouldGeneratePdf { get; set; } } } MasterPage: <!DOCTYPE html> <html> <head> <title>@ViewBag.Title</title> <link href="@Url.Content("~/Content/Site.css")" rel="stylesheet" type="text/css" /> <link href="@Url.Content("~/Content/kendo/2012.2.913/kendo.common.min.css")" rel="stylesheet" type="text/css" /> <link href="@Url.Content("~/Content/kendo/2012.2.913/kendo.dataviz.min.css")" rel="stylesheet" type="text/css" /> <link href="@Url.Content("~/Content/kendo/2012.2.913/kendo.blueopal.min.css")" rel="stylesheet" type="text/css" /> <script src="@Url.Content("~/Scripts/jquery-1.7.1.min.js")" type="text/javascript"></script> <script src="@Url.Content("~/Scripts/jquery.validate.min.js")" type="text/javascript"></script> <script src="@Url.Content("~/Scripts/jquery.validate.unobtrusive.min.js")" type="text/javascript"></script> <script src="@Url.Content("~/Scripts/jquery.unobtrusive-ajax.min.js")" type="text/javascript"></script> <script src="@Url.Content("~/Scripts/modernizr-2.5.3.js")" type="text/javascript"></script> <script src="@Url.Content("~/Scripts/kendo/2012.2.913/kendo.all.min.js")"></script> <script src="@Url.Content("~/Scripts/kendo/2012.2.913/kendo.aspnetmvc.min.js")"></script> </head> <body> <div class="page"> <header> <div id="title"> <h1>BHG :: PDF Service Generator</h1> </div> </header> <section id="main"> @RenderBody() </section> <footer> </footer> </div> </body> </html> View: @model PDFConverterModel.ViewModels.ViewModelTemplate_Guarantors @using (Html.BeginForm("ProcessForm", "Home", new AjaxOptions { HttpMethod = "POST" })) { <table style="width: 1000px"> @Html.HiddenFor(x => x.ShouldGeneratePdf) <tr> <td> <img alt="BHG Logo" src="~/Images/logo.gif" /> </td> </tr> <tr> <td> @(Html.Kendo().IntegerTextBox() .Placeholder("Enter Loan Id") .Name("LoanId") .Format("{0:#######}") .Value(Convert.ToInt32(Model.LoanId)) ) </td> </tr> <tr> <td>@Html.Label("Loan Type: ") @Html.DisplayFor(model => Model.LoanType) </td> <td> <label for="ddlDept">Department:</label> @(Html.Kendo().DropDownListFor(model => Model.ddlDept) .Name("ddlDept") .DataTextField("DepartmentName") .DataValueField("DepartmentID") .Events(e => e.Change("Refresh")) .DataSource(source => { source.Read(read => { read.Action("GetDepartments", "Home"); }); }) .Value(Model.ddlDept.ToString()) ) </td> </tr> @if (Model.ShowGeneratePDFBtn == true) { if (Model.ErrorT == string.Empty) { <tr> <td> <u><b>@Html.Label("Templates:")</b></u> </td> </tr> <tr> @for (int i = 0; i < Model.Templates.Count; i++) { <td> @Html.CheckBoxFor(model => Model.Templates[i].IsChecked) @Html.DisplayFor(model => Model.Templates[i].TemplateId) </td> } </tr> } else { <tr> <td> <b>@Html.DisplayFor(model => Model.ErrorT)</b> </td> </tr> } if (Model.ErrorG == string.Empty) { <tr> <td> <u><b>@Html.Label("Guarantors:")</b></u> </td> </tr> <tr> @for (int i = 0; i < Model.Guarantors.Count; i++) { <td> @Html.CheckBoxFor(model => Model.Guarantors[i].isChecked) @Html.DisplayFor(model => Model.Guarantors[i].GuarantorFirstName)&nbsp;@Html.DisplayFor(model => Model.Guarantors[i].GuarantorLastName) </td> } </tr> } else { <tr> <td> <b>@Html.DisplayFor(model => Model.ErrorG)</b> </td> </tr> } } <tr> <td> <input type="submit" name="submitbutton" id="btnRefresh" value='Refresh' /> </td> @if (Model.ShowGeneratePDFBtn == true) { <td> <input type="submit" name="submitbutton" id="btnGeneratePDF" value='Generate PDF' /> </td> } </tr> <tr> <td style="color: red; font: bold"> @Model.Error </td> </tr> </table> } <script type="text/javascript"> $('#btnRefresh').click(function () { Refresh(); }); function Refresh() { var LoanID = $("#LoanID").val(); if (parseInt(LoanID) != 0) { $('#ShouldGeneratePdf').val(false) document.forms[0].submit(); } else { alert("Please enter a LoanId"); } } //$(function () { // //DOM loaded // $('#btnGeneratePDF').click(function () { // DisableGeneratePDF(); // $('#ShouldGeneratePdf').val(true) // }); //}); //function DisableGeneratePDF() { // $('#btnGeneratePDF').attr("disabled", true); // $('#btnRefresh').attr("disabled", true); //} $('#btnGeneratePDF').click(function () { alert("inside click function"); DisableGeneratePDF(); $('#ShouldGeneratePdf').val(true) tof = $('#ShouldGeneratePdf').val(); alert("ShouldGeneratePdf set to " + tof); }); function DisableGeneratePDF() { alert("begin DisableGeneratePDF function"); $('#btnGeneratePDF').attr("disabled", true); $('#btnRefresh').attr("disabled", true); alert("end DisableGeneratePDF function"); } </script> Controller: [HttpPost] public ActionResult ProcessForm(string submitbutton, ViewModelTemplate_Guarantors model, FormCollection collection) if ((submitbutton == "Refresh") || (submitbutton == null) && (model.ShouldGeneratePdf == false)) { } else if ((submitbutton == "Generate PDF") || (model.ShouldGeneratePdf == true)) { } The "Alerts" in the script above come out to exactly what they should be on the remote server. The last alert shows that the value of the bool variable is "true". However, when I do page source views of the hidden variable, below is the result. The values of the hidden variable when the page loads and when the last alert button finishes are as follows: My local machine: The remote machine: As you can see, the value on my machine is set to true when the process executes. However, on the remote machine, it is set to false where it then doesn't excute. Why isn't the value in the model being returned as TRUE on the remote machine?

    Read the article

  • Silverlight beyond the basics

    - by Braulio Díez Botella
    Once I have learned the basics of Silverlight, I realized that there was still a lot to learn, architecture, patterns & practices, data access technologies… BUT… there’s plenty of material out there and few available time. I have compiled a set of articles/web casts / posts I found pretty useful for me, and defined a “learning roadmap”.   About the learning road map:    About the links: Basics MVVM Pattern: MSDN Magazine Basics RIA Services: RIA Services Intro RIA Services and Visual Studio 2010 MVVM + PRISM: MVVM + PRISM  MEF: MSDN Magazine RIA Services + MVVM: Mix10 RIA Services + MVVM + MEF: Shawn Wildermuth Series (1) Shawn Wildermuth Series (2) Shawn Wildermuth Series (3) Shawn Wildermuth Series (4) Some of them are based on Beta version of the products, but the core concepts are there and quite well explained. Please if you have other superb references add it on the comments section, hope to build a “version 2” of this post including or your feeback, thanks.

    Read the article

  • How do I implement a DataGrid with an MVVM approach.

    - by Fred
    Hi, I'd like to implement a sort of Addressbook/Contactbook using a Datagrid (or a List) and the MVVM pattern. Something like in Outlook/Thunderbird, where you've a list of your contacts displayed with a 2-3 main fields (name surname for example), and when you double-click a contact, then you get a new modal box that displays all the details of this specific contact. Since a couple of weeks/months, I'm reading a lot of stuff about MVVM pattern on the net, but somehow, I get confused. Until now, I could find any sample like this. (perhaps, I searched wrong?) How could I organize such an application? Thx in advance for your help.

    Read the article

  • Adventures in Windows 8: Understanding and debugging design time data in Expression Blend

    - by Laurent Bugnion
    One of my favorite features in Expression Blend is the ability to attach a Visual Studio debugger to Blend. First let’s start by answering the question: why exactly do you want to do that? Note: If you are familiar with the creation and usage of design time data, feel free to scroll down to the paragraph titled “When design time data fails”. Creating design time data for your app When a designer works on an app, he needs to see something to design. For “static” UI such as buttons, backgrounds, etc, the user interface elements are going to show up in Blend just fine. If however the data is fetched dynamically from a service (web, database, etc) or created dynamically, most probably Blend is going to show just an empty element. The classical way to design at that stage is to run the application, navigate to the screen that is under construction (which can involve delays, need to log in, etc…), to measure what is on the screen (colors, margins, width and height, etc) using various tools, going back to Blend, editing the properties of the elements, running again, etc. Obviously this is not ideal. The solution is to create design time data. For more information about the creation of design time data by mocking services, you can refer to two talks of mine “Deep dive MVVM” and “MVVM Applied From Silverlight to Windows Phone to Windows 8”. The source code for these talks is here and here. Design time data in MVVM Light One of the main reasons why I developed MVVM Light is to facilitate the creation of design time data. To illustrate this, let’s create a new MVVM Light application in Visual Studio. Install MVVM Light from here: http://mvvmlight.codeplex.com (use the MSI in the Download section). After installing, make sure to read the Readme that opens up in your favorite browser, you will need one more step to install the Project Templates. Start Visual Studio 2012. Create a new MvvmLight (Win8) app. Run the application. You will see a string showing “Welcome to MVVM Light”. In the Solution explorer, right click on MainPage.xaml and select Open in Blend. Now you should see “Welcome to MVVM Light [Design]” What happens here is that Expression Blend runs different code at design time than the application runs at runtime. To do this, we use design-time detection (as explained in a previous article) and use that information to initialize a different data service at design time. To understand this better, open the ViewModelLocator.cs file in the ViewModel folder and see how the DesignDataService is used at design time, while the DataService is used at runtime. In a real-life applicationm, DataService would be used to connect to a web service, for instance. When design time data fails Sometimes however, the creation of design time data fails. It can be very difficult to understand exactly what is happening. Expression Blend is not giving a lot of information about what happened. Thankfully, we can use a trick: Attaching a debugger to Expression Blend and debug the design time code. In WPF and Silverlight (including Windows Phone 7), you could simply attach the debugger to Blend.exe (using the “Managed (v4.5, v4.0) code” option even for Silverlight!!) In Windows 8 however, things are just a bit different. This is because the designer that renders the actual representation of the Windows 8 app runs in its own process. Let’s illustrate that: Open the file DesignDataService in the Design folder. Modify the GetData method to look like this: public void GetData(Action<DataItem, Exception> callback) { throw new Exception(); // Use this to create design time data var item = new DataItem("Welcome to MVVM Light [design]"); callback(item, null); } Go to Blend and build the application. The build succeeds, but now the page is empty. The creation of the design time data failed, but we don’t get a warning message. We need to investigate what’s wrong. Close MainPage.xaml Go to Visual Studio and select the menu Debug, Attach to Process. Update: Make sure that you select “Managed (v4.5, v4.0) code” in the “Attach to” field. Find the process named XDesProc.exe. You should have at least two, one for the Visual Studio 2012 designer surface, and one for Expression Blend. Unfortunately in this screen it is not obvious which is which. Let’s find out in the Task Manager. Press Ctrl-Alt-Del and select Task Manager Go to the Details tab and sort the processes by name. Find the one that says “Blend for Microsoft Visual Studio 2012 XAML UI Designer” and write down the process ID. Go back to the Attach to Process dialog in Visual Studio. sort the processes by ID and attach the debugger to the correct instance of XDesProc.exe. Open the MainViewModel (in the ViewModel folder) Place a breakpoint on the first line of the MainViewModel constructor. Go to Blend and open the MainPage.xaml again. At this point, the debugger breaks in Visual Studio and you can execute your code step by step. Simply step inside the dataservice call, and find the exception that you had placed there. Visual Studio gives you additional information which helps you to solve the issue. More info and Conclusion I want to thank the amazing people on the Expression Blend team for being very fast in guiding me in that matter and encouraging me to blog about it. More information about the XDesProc.exe process can be found here. I had to work on a Windows 8 app for a few days without design time data because of an Exception thrown somewhere in the code, and it was really painful. With the debugger, finding the issue was a simple matter of stepping into the code until it threw the exception.   Laurent Bugnion (GalaSoft) Subscribe | Twitter | Facebook | Flickr | LinkedIn

    Read the article

  • Silverlight Cream for May 02, 2010 -- #854

    - by Dave Campbell
    In this Issue: Michael Washington, Jason Young(-2-, -3-), Phil Middlemiss, Jeremy Likness, Victor Gaudioso, Kunal Chowdhury, Antoni Dol, and Jacek Ciereszko(-2-). Shoutout: Victor Gaudioso has aggregated All of My Silverlight Video Tutorials in One Place (revised again 05.02.10) From SilverlightCream.com: Unit Testing A Silverlight 'Simplified MVVM' Modal Popup Michael Washington's latest 'Simplified MVVM' post is published at The Code Project and is on Unit Testing with MVVM. Input Localization in Silverlight without IValueConverter Jason Young sent me some links to posts I've not seen... this first one is on localization by using the Language property of the Root Visual. MVVM – The Model - Part 1 – INotifyPropertyChanged Jason Young's next archive post is the first of a series on MVVM and Silverlight 4 ... implementing a simple ViewModel base class. Silverlight, WCF, and ASP.Net Configuration Gotchas Jason Young worked at tracking down the answers to some forum questions and in the process has produced a post of 'gotchas' with using WCF in Silverlight. A Chrome and Glass Theme - Part 5 Phil Middlemiss has part 5 of his Chrome and Glass Theme tutorial up ... in this one, he's looking at the Progress Bar and Slider. Download the files and play along. Silverlight Out of Browser (OOB) Versions, Images, and Isolated Storage Jeremy Likness has a post up responding to his 3 major questions about OOB apps, and he has to code up for the sample too. New Silverlight Video Tutorial: How to Make a Slide In/Out Navigation Bar – All in Blend Victor Gaudioso's latest video tutorial is on building a Behavior for a Slide in/out Navigation bar... kinda like the menu sliders on my GlyphMap Utility... only easier! Command Binding in Silverlight 4 (Step-by-Step) Kunal Chowdhury has another post up at DotNetFunda, and this time he's talking about Command Binding in Silverlight 4 with an eye toward MVVM usage. The Silverlight PageCurl implementation Antoni Dol has a post up about doing a Page Curl effect in Silverlight. He has a manual up on the effect and full application code. How to center and scale Silverlight applications using ViewBox control Jacek Ciereszko has a couple posts up about centering and scaling your app with the ViewBox control. This first one is a code solution. Source is available, as is a Polish version. Silverlight Center And Scale Behavior Jacek Ciereszko's 2nd post, he provides a Behavior that handles the scaling and centering of the previous post. Stay in the 'Light! Twitter SilverlightNews | Twitter WynApse | WynApse.com | Tagged Posts | SilverlightCream Join me @ SilverlightCream | Phoenix Silverlight User Group Technorati Tags: Silverlight    Silverlight 3    Silverlight 4    Windows Phone MIX10

    Read the article

  • Silverlight Cream for June 16, 2010 -- #884

    - by Dave Campbell
    In this Issue: Zoltan Arvai, Emiel Jongerius, Charles Petzold, Adam Kinney, Deepesh Mohnani, Timmy Kokke, and Damon Payne. Shoutouts: Andy Beaulieu reported his Coding4Fun: Shuffleboard Game for WP7 has been posted -- Big ol' Tutorial and 6 videos of WP7 goodness Karl Shifflett announced Three New WPF and Silverlight Designer Videos Posted Charles Petzold has a cool Flip-Number Clock in Silverlight posted... cool demo, and the source. From SilverlightCream.com: Data Driven Applications with MVVM Part II: Messaging, Unit Testing, and Live Data Sources Zoltan Arvai has part 2 of his Data-Driven Apps with MVVM up, and this one is also including Messaging, Unit Testing, and Live WCF Data... good tutorial and all the code. Silverlight DataContext Changed Event and Trigger Emiel Jongerius takes a hard swing at the lack of DataContextChanged... his solution involves two attached properties instead of one... check it out and see what you think! Orientation Strategies for Windows Phone 7 Charles Petzold is discussing WP7 Orientation... showing the problems you can get involved in, and how to work through them... and you might be surprised at how he does it :) ... pretty cool as usual, Charles! Debugging the TranslateZoomRotate WPF Behavior in Blend Adam Kinney talks through a bug reported about the WPF TranslateZoomRotate Behavior. Again, it's WPF, but it's in Blend, and ya never know when the solution might apply. I want my app to look like the Zune client Deepesh Mohnani demonstrates using the Cosmopolitan theme to get his app to have the same look as the Zune client. MVVM Project and Item Templates Timmy Kokke is continuing with his cool SilverAmp media player, using it to expand upon the new Blend and Silverlight 4 features. This episode touches very lightly on cranking up a new MVVM project in Blend. Great Features for MVVM Friendly Objects Part 0: Favor Composition Over Inheritance Damon Payne has the first part up of a series he's working on with 'MVVM Friendly' features... he's building out a lot of the infrastructure in this post for the ones that follow... all good stuff. Stay in the 'Light! Twitter SilverlightNews | Twitter WynApse | WynApse.com | Tagged Posts | SilverlightCream Join me @ SilverlightCream | Phoenix Silverlight User Group Technorati Tags: Silverlight    Silverlight 3    Silverlight 4    Windows Phone MIX10

    Read the article

  • Silverlight Cream for April 18, 2010 -- #840

    - by Dave Campbell
    In this Issue: CrocusGirl, Giorgetti Alessandro(-2-), smartyP, Pete Brown, David Poll, David Anson, and Bill Reiss. Shoutouts: Yasser Makram has a post up discussing Human Centered ALM with Telerik TeamPulse and Team Foundation Server. I saw this demo'd at DevConnnections and it definitely deserves a look. Shawn Wildermuth posted his materials from DevConnections all on one post: Back from DevConnections with SourceCode Shawn Wildermuth also posted an Updated RIA Services + MVVM Example Laurent Bugnion announced a Small change in MVVM Light Toolkit templates for Blend 4 RC Laurent Bugnion also announced Crowdsourcing MVVM Light Toolkit support The Expression Blend and Design Blog announced Expression Blend 4 Release Candidate Available! Dan Wahlin posted Slides and Code from my Silverlight MVVM Talk at DevConnections From SilverlightCream.com: Windows Phone 7 Design Notes – Part#1: Metro Resources CrocusGirl has blogged about WP7 and the Metro design concept. She has a bunch of resources up and information about Metro and the design methodology. Stay tuned for Part 2. Silverlight, M-V-VM ... and IoC - part 1 Giorgetti Alessandro has part 1 of a multi-parter up on IoC and MVVM for LOB apps in Silverlight ... a pretty quick into to MVVM. Silverlight, M-V-VM … and IoC – part 2 Giorgetti Alessandro also posted part 2 of his series, and this one digs deeper into the code and discusses what goes into the view and the model. Using the Facebook Developer Toolkit With Windows Phone 7 smartyP has a post addressing using the Facebook Developer toolkit with WP7... it took some hacking, and he explains it, and provides it for download. Silverlight and WPF Tip: Fitting items in a ListBox Having trouble fitting items into a Listbox in Silverlight or WPF without getting horizontal scrollbars? Pete Brown has a solution for you in 4 steps. Making printing easier in Silverlight 4 David Poll has a great detailed post up about printing in SL4, taking it to building a higher-level API that allows printing of collections... all demos and source included. Detailed information about the Silverlight Toolkit's new stacked series support David Anson details the improvements to Data Visualization in the Toolkit release from last week. Space Rocks game step 9: the asteroid sprite Bill Reiss has his latest game episode up and this time he's putting asteroid sprites in play. No placement, movement, or collisions yet, but it's a beginning. And, he's updated all his code to Silverlight 4. Stay in the 'Light! Twitter SilverlightNews | Twitter WynApse | WynApse.com | Tagged Posts | SilverlightCream Join me @ SilverlightCream | Phoenix Silverlight User Group Technorati Tags: Silverlight    Silverlight 3    Silverlight 4    Windows Phone MIX10

    Read the article

  • The Silverlightning Talks

    - by Brian Genisio's House Of Bilz
    Tomorrow, I will be speaking in Grand Rapids at the Silverlight Firestarter.  It is a one day event intended to get people bootstrapped with Silverlight.  I will be giving the “Advanced Topics” presentation.  I have decided to run it as a series of “Lightning Talks”.  The idea is to give a lot of breadth so you know that the topic exists and move quickly between them.  To go along with the talks, here are a bunch of links that you might find useful: MVVM http://msdn.microsoft.com/en-us/magazine/dd458800.aspx http://msdn.microsoft.com/en-us/magazine/dd419663.aspx http://channel9.msdn.com/shows/Continuum/MVVM/ http://karlshifflett.wordpress.com/2008/11/08/learning-wpf-m-v-vm/ http://johnpapa.net/silverlight/5-minute-overview-of-mvvm-in-silverlight/ Good MVVM Frameworks http://www.galasoft.ch/mvvm/getstarted/ http://caliburn.codeplex.com/Wikipage   Prism http://compositewpf.codeplex.com/ http://mtaulty.com/CommunityServer/blogs/mike_taultys_blog/archive/2009/10/27/prism-and-silverlight-screencasts-on-channel-9.aspx http://www.grumpydev.com/2009/07/04/why-shouldn%E2%80%99t-i-use-prism/   Unit Testing Silverlight Unit Testing Framework http://code.msdn.microsoft.com/silverlightut http://silverlight.codeplex.com/ http://www.jeff.wilcox.name/2008/03/silverlight2-unit-testing/ NUnit Testing with Silverlight http://weblogs.asp.net/nunitaddin/archive/2008/05/01/silverlight-nunit-projects.aspx Useful Testing Tools http://testdriven.net/ http://nunit.org/ http://code.google.com/p/moq/ http://www.ayende.com/projects/rhino-mocks.aspx   Navigation Framework http://www.silverlightshow.net/items/The-Silverlight-3-Navigation-Framework.aspx http://www.silverlight.net/learn/videos/silverlight-videos/navigation-framework/   Farseer Physics Engine http://farseerphysics.codeplex.com/Wikipage http://physicshelper.codeplex.com/Wikipage http://www.andybeaulieu.com/Home/tabid/67/Default.aspx   Windows Phone 7 http://www.silverlight.net/getstarted/devices/windows-phone/ http://msdn.microsoft.com/en-us/library/ff402535%28VS.92%29.aspx

    Read the article

  • Adventures in MVVM &ndash; My ViewModel Base &ndash; Silverlight Support!

    - by Brian Genisio's House Of Bilz
    More Adventures in MVVM In my last post, I outlined the powerful features that are available in the ViewModelSupport.  It takes advantage of the dynamic features of C# 4.0 (as well as some 3.0 goodies) to help eliminate the plumbing that often comes with writing ViewModels.  If you are interested in learning about the capabilities, please take a look at that post and look at the code on CodePlex.  When I wrote about the ViewModel base class, I complained that the features did not work in Silverlight because as of 4.0, it does not support binding to dynamic properties.  Although I still think this is a bummer, I am happy to say that I have come up with a workaround.  In the Silverlight version of my base class, I include a PropertyCollectionConverter that lets you bind to dynamic properties in the ViewModelBase, especially the convention-based commands that the base class supports. To take advantage of any properties that are not statically defined, you can bind to the Properties property of the ViewModel and pass in a converter parameter for the name of the property you want to bind. For example, a ViewModel that looks like this: public class ExampleViewModel : ViewModelBase { public void Execute_MyCommand() { Set("Text", "Foo"); } } Can bind to the dynamic property and the convention-based command with the following XAML. <TextBlock Text="{Binding Properties, Converter={StaticResource PropertiesConverter}, ConverterParameter=Text}" Margin="5" /> <Button Content="Execute MyCommand" Command="{Binding Properties, Converter={StaticResource PropertiesConverter}, ConverterParameter=MyCommand}" Margin="5" /> Of course, it is not as pretty as binding to Text and MyCommand like you can in WPF.  But, it is better than having a failed feature.  This allows you to share your ViewModels between WPF and Silverlight very easily.  <BeatDeadHorse>Hopefully, in Silverlight 5.0, we will see binding to dynamic properties more directly????</BeatDeadHorse>

    Read the article

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