Search Results

Search found 4517 results on 181 pages for 'mvvm light'.

Page 19/181 | < Previous Page | 15 16 17 18 19 20 21 22 23 24 25 26  | Next Page >

  • Bluetooth light not turned on and bluetooth also not working on vostro 1014

    - by Dinesh Kumar
    after running following command dmesg | grep -i bluetooth [ 17.106250] Bluetooth: Core ver 2.16 [ 17.107845] Bluetooth: HCI device and connection manager initialized [ 17.107847] Bluetooth: HCI socket layer initialized [ 17.107849] Bluetooth: L2CAP socket layer initialized [ 17.107857] Bluetooth: SCO socket layer initialized [ 18.853255] Bluetooth: BNEP (Ethernet Emulation) ver 1.3 [ 18.853260] Bluetooth: BNEP filters: protocol multicast [ 18.859350] Bluetooth: RFCOMM TTY layer initialized [ 18.859355] Bluetooth: RFCOMM socket layer initialized [ 18.859357] Bluetooth: RFCOMM ver 1.11 [14998.338293] init: bluetooth main process ended, respawning

    Read the article

  • Problem with Numlock light and remapping keyboard

    - by ansidev
    I upgraded to Ubuntu 13.10. And there are two problem: Numlock is on. But after I press Ctrl+Space (hotkey for IBus, (default in 13.10 is Super+Space)), Numlock is off and I must press Numlock button twice to enable Numlock. About remapping keyboard, because my keyboard have some broken key, so I am using xmodmap to remap my keyboard (config file for xmodmap is $HOME/.xmodmap). But when I switch keyboard layout (I mentioned above), everything changed to default, and I must run xmodmap .xmodmap to remap keyboard again. When using Ubuntu 13.04, everything is good. How to solve my problems? UPDATE: 1. I am using two keyboard layout: English (US) and Unikey (from ibus-unikey package). 2. If I change key board layout using menu on Unity panel, no first problem.

    Read the article

  • Qt's future in the light of Nokia-Microsoft partnership

    - by Shinnok
    In case you missed it, a lot has happened in the last two day that could potentially impact the Qt framework, for the worse. :-( It will impact the mobile sector in several and probably not currently acknowledged ways, for sure. It started yesterday with Nokia's CEO Stephen Elop internal letter depicting Nokia sitting on a burning platform and the need for a big and aggressive shift in business. A day later, at the Nokia World conference, Nokia announced the partnership with Microsoft , which at the moment resumes to Nokia adopting the Windows Phone 7 platform and development environment, dumping Symbian along the road and tagging Meego as R&D(a pretty dangerous keyword if you ask me), as for Maemo/N900 series i guess it's bye bye for good. I know what you're thinking but no, Qt is not going to be ported to the Window Phone platform. And i'm also scared about this. You can watch the Elop & Ballmer joint press release here. Now after reading this huge thread on the Qt-interest mailing list i can't help but wonder, what is the future of Qt at Nokia, now that they aren't focused(at all?) on Qt anymore(remember the full focus switch on Qt as main development framework for all Nokia products(including Symbian, yes) back in October?). I love Qt, in my opinion it is the only true cross-platform application development framework and one of the few to make C++ development a joy(to the extent possible) and good things has happened to the framework and considerable momentum while under Nokia, thus i am wondering, what are the chances that Qt might suffer a slow death at Nokia after this? Yes i know about KDE.org and the fact that Qt is easily spawnable, but i still feel uneasy. It also must be horrible for all of the efforts either by Nokia employees or third parties that have gone into Symbian and all of the Ovi Store Symbian/Qt content and business and why not, Maemo/Meego. There are also massive layouts planned, i suspect Symbian techs and Qt? I'd love to hear your input on this? Is Qt future safe&proof? LE: The question as been gradually revised, improved and better referenced, thus you might want to throw a quick re-read to see what you might have missed.

    Read the article

  • Using heavyweight ORM implementation for light based games

    - by Holland
    I'm just about to engulf myself in an MVC-based/Component architecture in C#, using MySQL's connector/Net for the data storage, and probably some NHibernate/FluentNHibernate Object-relational-mapping to map out the data structure. The goal is to build a scalable 2D RPG. Then I think about it...and I can't help but think this seems a little "heavy weight" for a 2D RPG, especially one which, while I plan to incorporate a lot of functionality and entertaining gameplay, may be ported to something like Windows Phone or Android in the future. Yet, on the other hand even a 2-Dimensional RPG can become very complicated, and therefore must incorporate a lot of functionality. While this can be accomplished with text/XML/JSON for data storage, is there a better way? Is something such as Object-Relational-Mapping useful in such an application? So, what do you think? Would you say that there is a place for such technologies? I don't know what to think...

    Read the article

  • Light Weight Monitoring using Extended Events

    Introduction SQL Server 2008 introduces Extended Events for performance monitoring. SQL Server Extended Events is a general event-handling system for server systems. So  why another event handling system? We already have activity monitor, Perfmon, SQL Profiler, DMVs,. However, Extended Events ... [Read Full Article]

    Read the article

  • LightScythe Creates Huge Light Paintings

    - by Jason Fitzpatrick
    Earlier this year we showed you how an LED POV staff could be used to visualize network data. This build takes it to another level and allows you to imprint entire words and images into photos. Gavin, a hardware hacker from Sydney, built an open-source POV (persistence of vision) staff after the Wi-Fi visualizer inspired him to begin playing with large POV builds. He built his POV staff using LED strips, wireless controllers, and a laptop to send the signals at the proper intervals to the staff. He can write words, create images, and even send Pac-Man racing across the frame. Hit up the link below to read more about his project and grab his schematics and parts lists. LightScythe [The Mechatronics Guy via Make] HTG Explains: Photography with Film-Based CamerasHow to Clean Your Dirty Smartphone (Without Breaking Something)What is a Histogram, and How Can I Use it to Improve My Photos?

    Read the article

  • Looking for a small, light scene graph style abstraction lib for shader based OpenGL

    - by Pris
    I'm looking for a 'lean and mean' c/c++ scene graph library for OpenGL that doesn't use any deprecated functionality. It should be cross platform (strictly speaking I just dev on Linux so no love lost if it doesn't work on Windows), and it should be possible to deploy to mobile targets (ie OpenGLES2, and no crazy mandatory dependencies that wouldn't port well to modern mobile frameworks like iOS, Android, etc), with a license that's compatible with closed source software (LGPL or more liberal). Specific nice-to-haves would be: Cameras and Viewers (trackball, fly-by, etc) Object transform hierarchies (if B is a child of A, and you move A, B has the same transform applied to it) Simple animation Scene optimization (frustum culling, use VBOs, minimize state changes, etc) Text I've played around with OpenSceneGraph a lot and it's pretty amazing for fixed function pipeline stuff, but I've had a few of problems using it with the programmable pipeline and after going through their mailing list, it seems several people have had similar issues (going back years). Kitware's VES looks neat (http://www.vtk.org/Wiki/VES), but VES + VTK is pretty heavy. VTK is also typically for analyzing scientific data and I've read that it's not that appropriate for a general use case (not that great at rendering a lot of objects on scene,etc) I'm currently looking at VisualizationLibrary (http://www.visualizationlibrary.org/documentation/pag_gallery.html) which looks like it offers some of the functionality I'd like, but it doesn't explicitly support mobile targets. Other solutions like Ogre, Horde3D, Irrlicht, etc tend to be full on game engines and that's not really what I'm looking for. I'd like some suggestions for other libraries that I may have missed... please note I'm not willing to roll my own solution from scratch.

    Read the article

  • Flixel: doesn't light tile up

    - by Arno
    i'm creating a game with flixel, and I want to have a effect when you mouse over a tile, I tried implementing it, and this is what it gives: public class GameState extends FlxState { private var block:EmptyBlock; public function GameState() { } override public function create():void { for (var i:Number = 0; i < 30; i++) { block = new EmptyBlock(i, 20); block.create(); } } override public function update():void { block.update(); super.update(); } } } GameState class and here is the EmptyBlock class: public class EmptyBlock { private var x:int; private var y:int; private var row:FlxRect public function EmptyBlock(x:int, y:int ) { this.x = x; this.y = y; } public function create():void { row = new FlxRect(x, y, 32, 32); trace ("Created block at" + x + y); } public function update():void { if (FlxG.mouse.screenX == row.x) { if (FlxG.mouse.screenY == row.y) { var outline:FlxSprite = new FlxSprite(row.x, row.y).makeGraphic(row.width, row.height, 0x002525); } } } } }

    Read the article

  • What's the best way to expose a Model object in a ViewModel?

    - by Angel
    In a WPF MVVM application, I exposed my model object into my viewModel by creating an instance of Model class (which cause dependency) into ViewModel. Instead of creating separate VM properties, I wrap the Model properties inside my ViewModel Property. My model is just an entity framework generated proxy class: public partial class TblProduct { public TblProduct() { this.TblPurchaseDetails = new HashSet<TblPurchaseDetail>(); this.TblPurchaseOrderDetails = new HashSet<TblPurchaseOrderDetail>(); this.TblSalesInvoiceDetails = new HashSet<TblSalesInvoiceDetail>(); this.TblSalesOrderDetails = new HashSet<TblSalesOrderDetail>(); } public int ProductId { get; set; } public string ProductCode { get; set; } public string ProductName { get; set; } public int CategoryId { get; set; } public string Color { get; set; } public Nullable<decimal> PurchaseRate { get; set; } public Nullable<decimal> SalesRate { get; set; } public string ImagePath { get; set; } public bool IsActive { get; set; } public virtual TblCompany TblCompany { get; set; } public virtual TblProductCategory TblProductCategory { get; set; } public virtual TblUser TblUser { get; set; } public virtual ICollection<TblPurchaseDetail> TblPurchaseDetails { get; set; } public virtual ICollection<TblPurchaseOrderDetail> TblPurchaseOrderDetails { get; set; } public virtual ICollection<TblSalesInvoiceDetail> TblSalesInvoiceDetails { get; set; } public virtual ICollection<TblSalesOrderDetail> TblSalesOrderDetails { get; set; } } Here is my ViewModel: public class ProductViewModel : WorkspaceViewModel { #region Constructor public ProductViewModel() { StartApp(); } #endregion //Constructor #region Properties private IProductDataService _dataService; public IProductDataService DataService { get { if (_dataService == null) { if (IsInDesignMode) { _dataService = new ProductDataServiceMock(); } else { _dataService = new ProductDataService(); } } return _dataService; } } //Get and set Model object private TblProduct _product; public TblProduct Product { get { return _product ?? (_product = new TblProduct()); } set { _product = value; } } #region Public Properties public int ProductId { get { return Product.ProductId; } set { if (Product.ProductId == value) { return; } Product.ProductId = value; RaisePropertyChanged("ProductId"); } } public string ProductName { get { return Product.ProductName; } set { if (Product.ProductName == value) { return; } Product.ProductName = value; RaisePropertyChanged(() => ProductName); } } private ObservableCollection<TblProduct> _productRecords; public ObservableCollection<TblProduct> ProductRecords { get { return _productRecords; } set { _productRecords = value; RaisePropertyChanged("ProductRecords"); } } //Selected Product private TblProduct _selectedProduct; public TblProduct SelectedProduct { get { return _selectedProduct; } set { _selectedProduct = value; if (_selectedProduct != null) { this.ProductId = _selectedProduct.ProductId; this.ProductCode = _selectedProduct.ProductCode; } RaisePropertyChanged("SelectedProduct"); } } #endregion //Public Properties #endregion // Properties #region Commands private ICommand _newCommand; public ICommand NewCommand { get { if (_newCommand == null) { _newCommand = new RelayCommand(() => ResetAll()); } return _newCommand; } } private ICommand _saveCommand; public ICommand SaveCommand { get { if (_saveCommand == null) { _saveCommand = new RelayCommand(() => Save()); } return _saveCommand; } } private ICommand _deleteCommand; public ICommand DeleteCommand { get { if (_deleteCommand == null) { _deleteCommand = new RelayCommand(() => Delete()); } return _deleteCommand; } } #endregion //Commands #region Methods private void StartApp() { LoadProductCollection(); } private void LoadProductCollection() { var q = DataService.GetAllProducts(); this.ProductRecords = new ObservableCollection<TblProduct>(q); } private void Save() { if (SelectedOperateMode == OperateModeEnum.OperateMode.New) { //Pass the Model object into Dataservice for save DataService.SaveProduct(this.Product); } else if (SelectedOperateMode == OperateModeEnum.OperateMode.Edit) { //Pass the Model object into Dataservice for Update DataService.UpdateProduct(this.Product); } ResetAll(); LoadProductCollection(); } #endregion //Methods } Here is my Service class: class ProductDataService:IProductDataService { /// <summary> /// Context object of Entity Framework model /// </summary> private MaizeEntities Context { get; set; } public ProductDataService() { Context = new MaizeEntities(); } public IEnumerable<TblProduct> GetAllProducts() { using(var context=new R_MaizeEntities()) { var q = from p in context.TblProducts where p.IsDel == false select p; return new ObservableCollection<TblProduct>(q); } } public void SaveProduct(TblProduct _product) { using(var context=new R_MaizeEntities()) { _product.LastModUserId = GlobalObjects.LoggedUserID; _product.LastModDttm = DateTime.Now; _product.CompanyId = GlobalObjects.CompanyID; context.TblProducts.Add(_product); context.SaveChanges(); } } public void UpdateProduct(TblProduct _product) { using (var context = new R_MaizeEntities()) { context.TblProducts.Attach(_product); context.Entry(_product).State = EntityState.Modified; _product.LastModUserId = GlobalObjects.LoggedUserID; _product.LastModDttm = DateTime.Now; _product.CompanyId = GlobalObjects.CompanyID; context.SaveChanges(); } } public void DeleteProduct(int _productId) { using (var context = new R_MaizeEntities()) { var product = (from c in context.TblProducts where c.ProductId == _productId select c).First(); product.LastModUserId = GlobalObjects.LoggedUserID; product.LastModDttm = DateTime.Now; product.IsDel = true; context.SaveChanges(); } } } I exposed my model object in my viewModel by creating an instance of it using new keyword, also I instantiated my DataService class in VM. I know this will cause a strong dependency. So: What's the best way to expose a Model object in a ViewModel? What's the best way to use DataService in VM?

    Read the article

  • MVVM- Expose Model object in ViewModel

    - by Angel
    I have a wpf MVVM application , I exposed my model object into my viewModel by creating an instance of Model class (which cause dependency) into ViewModel , and instead of creating seperate VM properties , I wrap the Model properties inside my ViewModel Property. My model is just an entity framework generated proxy classes. Here is my Model class : public partial class TblProduct { public TblProduct() { this.TblPurchaseDetails = new HashSet<TblPurchaseDetail>(); this.TblPurchaseOrderDetails = new HashSet<TblPurchaseOrderDetail>(); this.TblSalesInvoiceDetails = new HashSet<TblSalesInvoiceDetail>(); this.TblSalesOrderDetails = new HashSet<TblSalesOrderDetail>(); } public int ProductId { get; set; } public string ProductCode { get; set; } public string ProductName { get; set; } public int CategoryId { get; set; } public string Color { get; set; } public Nullable<decimal> PurchaseRate { get; set; } public Nullable<decimal> SalesRate { get; set; } public string ImagePath { get; set; } public bool IsActive { get; set; } public virtual TblCompany TblCompany { get; set; } public virtual TblProductCategory TblProductCategory { get; set; } public virtual TblUser TblUser { get; set; } public virtual ICollection<TblPurchaseDetail> TblPurchaseDetails { get; set; } public virtual ICollection<TblPurchaseOrderDetail> TblPurchaseOrderDetails { get; set; } public virtual ICollection<TblSalesInvoiceDetail> TblSalesInvoiceDetails { get; set; } public virtual ICollection<TblSalesOrderDetail> TblSalesOrderDetails { get; set; } } Here is my ViewModel , public class ProductViewModel : WorkspaceViewModel { #region Constructor public ProductViewModel() { StartApp(); } #endregion //Constructor #region Properties private IProductDataService _dataService; public IProductDataService DataService { get { if (_dataService == null) { if (IsInDesignMode) { _dataService = new ProductDataServiceMock(); } else { _dataService = new ProductDataService(); } } return _dataService; } } //Get and set Model object private TblProduct _product; public TblProduct Product { get { return _product ?? (_product = new TblProduct()); } set { _product = value; } } #region Public Properties public int ProductId { get { return Product.ProductId; } set { if (Product.ProductId == value) { return; } Product.ProductId = value; RaisePropertyChanged("ProductId"); } } public string ProductName { get { return Product.ProductName; } set { if (Product.ProductName == value) { return; } Product.ProductName = value; RaisePropertyChanged(() => ProductName); } } private ObservableCollection<TblProduct> _productRecords; public ObservableCollection<TblProduct> ProductRecords { get { return _productRecords; } set { _productRecords = value; RaisePropertyChanged("ProductRecords"); } } //Selected Product private TblProduct _selectedProduct; public TblProduct SelectedProduct { get { return _selectedProduct; } set { _selectedProduct = value; if (_selectedProduct != null) { this.ProductId = _selectedProduct.ProductId; this.ProductCode = _selectedProduct.ProductCode; } RaisePropertyChanged("SelectedProduct"); } } #endregion //Public Properties #endregion // Properties #region Commands private ICommand _newCommand; public ICommand NewCommand { get { if (_newCommand == null) { _newCommand = new RelayCommand(() => ResetAll()); } return _newCommand; } } private ICommand _saveCommand; public ICommand SaveCommand { get { if (_saveCommand == null) { _saveCommand = new RelayCommand(() => Save()); } return _saveCommand; } } private ICommand _deleteCommand; public ICommand DeleteCommand { get { if (_deleteCommand == null) { _deleteCommand = new RelayCommand(() => Delete()); } return _deleteCommand; } } #endregion //Commands #region Methods private void StartApp() { LoadProductCollection(); } private void LoadProductCollection() { var q = DataService.GetAllProducts(); this.ProductRecords = new ObservableCollection<TblProduct>(q); } private void Save() { if (SelectedOperateMode == OperateModeEnum.OperateMode.New) { //Pass the Model object into Dataservice for save DataService.SaveProduct(this.Product); } else if (SelectedOperateMode == OperateModeEnum.OperateMode.Edit) { //Pass the Model object into Dataservice for Update DataService.UpdateProduct(this.Product); } ResetAll(); LoadProductCollection(); } #endregion //Methods } Here is my Service class: class ProductDataService:IProductDataService { /// <summary> /// Context object of Entity Framework model /// </summary> private MaizeEntities Context { get; set; } public ProductDataService() { Context = new MaizeEntities(); } public IEnumerable<TblProduct> GetAllProducts() { using(var context=new R_MaizeEntities()) { var q = from p in context.TblProducts where p.IsDel == false select p; return new ObservableCollection<TblProduct>(q); } } public void SaveProduct(TblProduct _product) { using(var context=new R_MaizeEntities()) { _product.LastModUserId = GlobalObjects.LoggedUserID; _product.LastModDttm = DateTime.Now; _product.CompanyId = GlobalObjects.CompanyID; context.TblProducts.Add(_product); context.SaveChanges(); } } public void UpdateProduct(TblProduct _product) { using (var context = new R_MaizeEntities()) { context.TblProducts.Attach(_product); context.Entry(_product).State = EntityState.Modified; _product.LastModUserId = GlobalObjects.LoggedUserID; _product.LastModDttm = DateTime.Now; _product.CompanyId = GlobalObjects.CompanyID; context.SaveChanges(); } } public void DeleteProduct(int _productId) { using (var context = new R_MaizeEntities()) { var product = (from c in context.TblProducts where c.ProductId == _productId select c).First(); product.LastModUserId = GlobalObjects.LoggedUserID; product.LastModDttm = DateTime.Now; product.IsDel = true; context.SaveChanges(); } } } I exposed my model object in my viewModel by creating an instance of it using new keyword, also I instantiated my DataService class in VM, I know this will cause a strong dependency. So , 1- Whats the best way to expose Model object in ViewModel ? 2- Whats the best way to use DataService in VM ?

    Read the article

  • Amarok 2.3.0 "Clear Light" released

    <b>Amarok:</b> "Team Amarok is proud to announce Amarok 2.3.0. It contains many improvements and bugfixes over Amarok 2.2.2 as well as many new features. Areas such as podcast support and saved playlists have seen huge improvements, as has the support for USB mass storage devices (including generic MP3 players)."

    Read the article

  • Frustrated by the VS2012 'Light' and 'Dark' themes?

    - by ihaynes
    Like me you may be have been frustrated by the lack of colour in VS2012. The flat look, reminicent of the early 'Gem' OS is bad enough, but when the only choices are a washed out white look or the deadly all-black look, it's not an easy product to work with.Fortunately MS themselves seem to have quietly taken notice of this, or at least one of their developers has, and a 'Color Theme Editor' extension has been released. This comes with some much better colour schemes (I'm using the blue one, which is fairly close to VS2010) and also allows you to create and edit themes youself.This extension doesn't come up when you search 'Extensions and Updates' but can be found at http://tinyurl.com/6rhkdejWith this, using VS2012 finally becomes a pleasurable experience.

    Read the article

  • Partner case - ISE (Germany) - IDS brings light into Investment Controlling with Exadata

    - by Javier Puerta
    (Original post in German: IDS bringt mit Exadata Licht ins Investmentcontrolling) "The amount of data that IDS GmbH (Analysis and Reporting Services) has to cope with daily, is enormous: at the subsidiary of Allianz SE all the services are around Investment Controlling.The company needed an extensible data warehouse solution in which all the data could be merged together, harmonized and enriched. Finally IDS decided for Exadata to be as optimal solution, specifically the Oracle Exadata Database Machine. The implementation was carried out jointly with the Oracle Platinum Partner ISE, who took over the technical and advisory support part and will be IDS´ preffered consultant in any further Exadata development. See how Exadata is used and why this investment has paid off for IDS, by watching watching the following video (in German)"

    Read the article

  • street light and shadow in opengl ?

    - by Abhilash M
    To make a scene street illuminated, i tried, point source light, used glMaterial and used ambient light...... I get a scene fully illuminated, not exactly the way like street light, can anyone share resources or explain how exactly i can achieve this?? I went through many light resources in net, could not properly understand....

    Read the article

  • Silverlight Commands Hacks: Passing EventArgs as CommandParameter to DelegateCommand triggered by Ev

    - by brainbox
    Today I've tried to find a way how to pass EventArgs as CommandParameter to DelegateCommand triggered by EventTrigger. By reverse engineering of default InvokeCommandAction I find that blend team just ignores event args.To resolve this issue I have created my own action for triggering delegate commands.public sealed class InvokeDelegateCommandAction : TriggerAction<DependencyObject>{    /// <summary>    ///     /// </summary>    public static readonly DependencyProperty CommandParameterProperty =        DependencyProperty.Register("CommandParameter", typeof(object), typeof(InvokeDelegateCommandAction), null);    /// <summary>    ///     /// </summary>    public static readonly DependencyProperty CommandProperty = DependencyProperty.Register(        "Command", typeof(ICommand), typeof(InvokeDelegateCommandAction), null);    /// <summary>    ///     /// </summary>    public static readonly DependencyProperty InvokeParameterProperty = DependencyProperty.Register(        "InvokeParameter", typeof(object), typeof(InvokeDelegateCommandAction), null);    private string commandName;    /// <summary>    ///     /// </summary>    public object InvokeParameter    {        get        {            return this.GetValue(InvokeParameterProperty);        }        set        {            this.SetValue(InvokeParameterProperty, value);        }    }    /// <summary>    ///     /// </summary>    public ICommand Command    {        get        {            return (ICommand)this.GetValue(CommandProperty);        }        set        {            this.SetValue(CommandProperty, value);        }    }    /// <summary>    ///     /// </summary>    public string CommandName    {        get        {            return this.commandName;        }        set        {            if (this.CommandName != value)            {                this.commandName = value;            }        }    }    /// <summary>    ///     /// </summary>    public object CommandParameter    {        get        {            return this.GetValue(CommandParameterProperty);        }        set        {            this.SetValue(CommandParameterProperty, value);        }    }    /// <summary>    ///     /// </summary>    /// <param name="parameter"></param>    protected override void Invoke(object parameter)    {        this.InvokeParameter = parameter;                if (this.AssociatedObject != null)        {            ICommand command = this.ResolveCommand();            if ((command != null) && command.CanExecute(this.CommandParameter))            {                command.Execute(this.CommandParameter);            }        }    }    private ICommand ResolveCommand()    {        ICommand command = null;        if (this.Command != null)        {            return this.Command;        }        var frameworkElement = this.AssociatedObject as FrameworkElement;        if (frameworkElement != null)        {            object dataContext = frameworkElement.DataContext;            if (dataContext != null)            {                PropertyInfo commandPropertyInfo = dataContext                    .GetType()                    .GetProperties(BindingFlags.Public | BindingFlags.Instance)                    .FirstOrDefault(                        p =>                        typeof(ICommand).IsAssignableFrom(p.PropertyType) &&                        string.Equals(p.Name, this.CommandName, StringComparison.Ordinal)                    );                if (commandPropertyInfo != null)                {                    command = (ICommand)commandPropertyInfo.GetValue(dataContext, null);                }            }        }        return command;    }}Example:<ComboBox>    <ComboBoxItem Content="Foo option 1" />    <ComboBoxItem Content="Foo option 2" />    <ComboBoxItem Content="Foo option 3" />    <Interactivity:Interaction.Triggers>        <Interactivity:EventTrigger EventName="SelectionChanged" >            <Presentation:InvokeDelegateCommandAction                 Command="{Binding SubmitFormCommand}"                CommandParameter="{Binding RelativeSource={RelativeSource Self}, Path=InvokeParameter}" />        </Interactivity:EventTrigger>    </Interactivity:Interaction.Triggers>                </ComboBox>BTW: InvokeCommanAction CommandName property are trying to find command in properties of view. It very strange, because in MVVM pattern command should be in viewmodel supplied to datacontext.

    Read the article

  • Are there scenarios where the ViewModel needs to invoke methods on the View w.r.t. MVVM in WPF?

    - by Gishu
    As per the pattern, the ViewModel exposes Properties(with change notification) and Commands (to notify the VM of user actions) that the View binds to. The only communication that flows from the VM to the View is the property change notifications (so that the View can refresh itself with updated data). In MVP or PresentationModel form of the pattern (if I'm not mistaken), the View implements a plain vanilla interface (consisting of methods, properties and/or events). With MVVM, it feels methods on the IView have been outlawed (along with IView itself). One scenario I could think of was to set the focus to a certain control in the View. (When the user does ActionX, the focus should immediately be set to FieldY). In MVP, I'd write this as IView.ActivateField(NameConstant), which the presenter or PM would invoke. In MVVM, this seems to be a fringe case that needs a workaround / little bit of code-behind. The VM implements an ActiveField Property, which it sets to NameConstant. The view picks up the change notification event and in a code-behind event handler, activates the Name control. Is the above just an exception to the norm? Or are there other such scenarios, where the VM needs to invoke a method on the View ?

    Read the article

  • NIC light is turned off after boot on Redhat 4.6 server

    - by hoffmandirt
    I have a 2950 blade server setup with Red Hat 4.6 installed. I cannot get the NIC to work properly after reinstalling Linux. I activated the NIC, but the NIC light will not turn on when I plug the network cable into the hub. The status light on the hub will not turn on either. If I run ifconfig, the NIC status is UP. Also I can ping the IP address that I assign to the Linux machine, but I can't ping anything else that is plugged into the hub. When I reboot the system, the NIC light will stay on until the system fully boots and then it will turn off again. Is there something else that I need to do to get the NIC working? It appears to be disabled even though ifconfig says that it is UP. Maybe I need to configure something within the blade server (iDRAC)?

    Read the article

  • How to disable the green power light on the Sony Vaio

    - by sri
    The Sony Vaio's green power light is extremely bright and very distracting! I can't even look at the screen without this power light being in my view!! Is there any way to disable it or reduce its intensity? Googling for "sony vaio disable green power light" (and similar combinations) didn't provide anything useful. I tried booting into the BIOS, but it didn't have an option for this. Also, the Viao Command Center didn't have any on it. I guess sticking a tape over the LED is the only option? Any help is greatly appreciated! Thanks!

    Read the article

  • Using MVVM, how to pass SelectedItems of a XamDataGrid as parameter to the Command raised by the Co

    - by saddaypally
    Hi, I'm trying to pass the item on XamDataGrid on which I do a mouse right click to open a ContextMenu, which raises a Command in my ViewModel. Somehow the method that the Command calls is not reachable in debug mode. This is the snipped from the view <ig:XamDataGrid DataSource="{Binding DrdResults}" Height="700" Width="600"> <ig:XamDataGrid.ContextMenu> <ContextMenu DataContext="{Binding RelativeSource={RelativeSource Mode=Self}, Path=PlacementTarget.DataContext}" AllowDrop="True" Name="cmAudit"> <MenuItem Header="View History" Command="{Binding ViewTradeHistory}" CommandParameter="{Binding Path=SelectedItems}"> </MenuItem> </ContextMenu> </ig:XamDataGrid.ContextMenu> <ig:XamDataGrid.FieldSettings> <ig:FieldSettings AllowFixing="NearOrFar" AllowEdit="False" Width="auto" Height="auto" /> </ig:XamDataGrid.FieldSettings> </ig:XamDataGrid> My code in the corresponding ViewModel for this View is as follows public WPF.ICommand ViewTradeHistory { get { if (_viewTradeHistory == null) { _viewTradeHistory = new DelegateCommand( (object SelectedItems) = { this.OpenTradeHistory(SelectedItems); }); } return _viewTradeHistory; } } And lastly the actual method that gets called by the Command is as below private void OpenTradeHistory(object records) { DataPresenterBase.SelectedItemHolder auditRecords = (DataPresenterBase.SelectedItemHolder)records; // Do something with the auditRecords now. } I'm not sure what am I doing incorrectly here. Any help will be very much appreciated. Thanks, Shravan

    Read the article

  • WPF MVVM UserControl Binding "Container", dispose to avoid memory leak.

    - by user178657
    For simplicity. I have a window, with a bindable usercontrol <UserControl Content="{Binding Path = BindingControl, UpdateSourceTrigger=PropertyChanged}"> I have two user controls, ControlA, and ControlB, Both UserControls have their own Datacontext ViewModel, ControlAViewModel and ControlBViewModel. Both ControlAViewModel and ControlBViewModel inh. from a "ViewModelBase" public abstract class ViewModelBase : DependencyObject, INotifyPropertyChanged, IDisposable........ Main window was added to IoC... To set the property of the Bindable UC, i do ComponentRepository.Resolve<MainViewWindow>().Bindingcontrol= new ControlA; ControlA, in its Datacontext, creates a DispatcherTimer, to do "somestuff".. Later on., I need to navigate elsewhere, so the other usercontrol is loaded into the container ComponentRepository.Resolve<MainViewWindow>().Bindingcontrol= new ControlB If i put a break point in the "someStuff" that was in ControlA's datacontext. The DispatcherTimer is still running... i.e. loading a new usercontrol into the bindable Usercontrol on mainwindow does not dispose/close/GC the DispatcherTimer that was created in the DataContext View Model... Ive looked around, and as stated by others, dispose doesnt get called because its not supposed to... :) Not all my usercontrols have DispatcherTimer, just a few that need to do some sort of "read and refresh" updates./. Should i track these DispatcherTimer objects in the ViewModelBase that all Usercontrols inh. and manually stop/dispose them everytime a new usercontrol is loaded? Is there a better way?

    Read the article

  • How do you handle 'SelectedItemChanged' events in a MVVM ViewModel?

    - by Travis
    I have some logic that depends upon two properties being set, as it executes when both properties have a value. For example: private void DoCalc() { if (string.IsNullOrEmpty(Property1) || string.IsNullOrEmpty(Property2)) return; Property3 = Property1 + " " + Property2; } That code would need to be executed every time Property1 or Property2 changed, but I'm having trouble figuring out how to do it in a stylistically acceptable manner. Here are the choices as I see them: 1) Call method from ViewModel I don't have a problem with this conceptually, as the logic is still in the ViewModel - I'm not a 'No code-behind' nazi. However, the 'trigger' logic (when either property changes) is still in the UI layer, which I don't love. The codebehind would look like this: void ComboBox_Property1_SelectedItemChanged(object sender, RoutedEventArgs e) { viewModel.DoCalc(); } 2) Call method from Property Setter This approach seems the most 'pure', but it also seems ugly, as if the logic is hidden. It would look like this: public string Property1 { get {return property1;} set { if (property1 != value) { property1 = value; NotifyPropertyChanged("Property1"); DoCalc(); } } } 3) Hook into the PropertyChanged event I'm now thinking this might be the right approach, but it feels weird to hook into the property changed event in the implementing viewmodel. It would look something like this: public ViewModel() { this.PropertyChanged += new PropertyChangedEventHandler(ViewModel_PropertyChanged); } void ViewModel_PropertyChanged(object sender, PropertyChangedEventArgs e) { if (e.PropertyName == "Property1" || e.PropertyName == "Property2") { DoCalc(); } } So, my question is, if you were browsing through some source code with that requirement, which approach would you prefer to see implemented (and why?). Thanks for any input.

    Read the article

< Previous Page | 15 16 17 18 19 20 21 22 23 24 25 26  | Next Page >