silverlight

ToggleButton/CheckBox content depending on its checked state?

▼魔方 西西 提交于 2020-01-02 04:27:06
问题 What's the shortest xamly way to make a ToggleButton contents depend on its checked state? In WPF I'd probably go for a DataTrigger which doesn't exist in Silverlight. I tried the following, but it doesn't work, as soon as I include the triggers, the binding to the source is broken. The triggers won't work anyway. <ToggleButton xmlns:i="http://schemas.microsoft.com/expression/2010/interactivity" xmlns:ei="http://schemas.microsoft.com/expression/2010/interactions" IsChecked="{Binding

Scrolling X axis Plot area - Silverlight Column Series

馋奶兔 提交于 2020-01-02 03:14:26
问题 I have a Column series chart which is working fine. I have a feature that i need to add to that, i want the horizontall scroll to be enabled to the plot area that is x-axis. Here is the screen shot: If you see the screen shot i have six items, and the bar are very thin because of more number of items, so suppose if i have 20 items then the bars will not be visible at all. So can we make the X-axis bar scrollable horizontally ? EDIT ResourceDictionary.xaml <ResourceDictionary xmlns="http:/

Why implement an interface on viewmodel and view in mvvm

我是研究僧i 提交于 2020-01-02 03:10:08
问题 I am quite new to MVVM pattern so please bear with me. I have seen implemnentations in wpf +mvvm + prism where all the views tend to have an IView as top most interface. Then the views in the respective modules have a view specific interface like IViewA, IViewB etc which implement the IView interface. Even the viewmodel has IViewModel top most interface and the subsequent modules have IViewAViewModel , IViewBViewModel etc that inherit from the IViewmodel. IViewmodel has a reference to Iview

Access to private method using reflection in C#/Silverlight applications

蹲街弑〆低调 提交于 2020-01-02 02:34:54
问题 My code invokes method using reflection: scoringType.InvokeMember("scoringClient_ScorePostsCompleted", BindingFlags.InvokeMethod | BindingFlags.Instance | BindingFlags.NonPublic, null, scoringInstance, new object[] { sArg, eArg }); where scoringInstance is an instance of a ModelView class. The method is private, but I use BindingFlags.NonPublic, so, i should be able to access it, but I cannot - I get MethodAccessException exception: "Attempt by method ... to access method ... failed." Google

silverlight datagrid - binding each row's style

六眼飞鱼酱① 提交于 2020-01-02 02:08:12
问题 i've got a silverlight (v2) datagrid where some items are section headers and as such must appear with a different background colour. i'm trying to do this with the following xaml: <dg:DataGrid.RowStyle> <Style TargetType="dg:DataGridRow"> <Setter Property="Background" Value="{Binding Path=Background, Mode=OneTime}" /> </Style> </dg:DataGrid.RowStyle> i expect it to bind the Background property of the datagrid row viewmodel to each row's Background property, instead i get a lovely unknown

Is there a “Browser Control” to host a website inside Flash/Silverlight?

我的未来我决定 提交于 2020-01-01 20:54:09
问题 I'm looking for something similar to the VB6 / .Net Winforms "Browser Control", that let's you show a browser inside your application. I don't want to just render a page, I want it to be a fully-functional browser, in which people can click links, will run Javascript, etc. In essence, what I want is an IFrame, only that it runs inside a Flash app, or a Silverlight app. The ultimate reason for this is that I want to defeat IFrame busters. I'm making a web app that lets you see other sites

Is there a “Browser Control” to host a website inside Flash/Silverlight?

梦想的初衷 提交于 2020-01-01 20:52:22
问题 I'm looking for something similar to the VB6 / .Net Winforms "Browser Control", that let's you show a browser inside your application. I don't want to just render a page, I want it to be a fully-functional browser, in which people can click links, will run Javascript, etc. In essence, what I want is an IFrame, only that it runs inside a Flash app, or a Silverlight app. The ultimate reason for this is that I want to defeat IFrame busters. I'm making a web app that lets you see other sites

Dragging a Rectangle which is inside a Grid

纵饮孤独 提交于 2020-01-01 19:20:09
问题 I managed to sort my "draggable inside grid" issue, however I found another issue. When I start dragging the Rectangle, it dissapears and reappears on mouseup. My code: public Page() { InitializeComponent(); dragGrid.AddHandler(RadDragAndDropManager.DragQueryEvent, new EventHandler<DragDropQueryEventArgs>(OnDragQuery)); dragGrid.AddHandler(RadDragAndDropManager.DropQueryEvent, new EventHandler<DragDropQueryEventArgs>(OnDropQuery)); dragGrid.AddHandler(RadDragAndDropManager.DropInfoEvent, new

Mvvm popup window with view model, parameter and result

北战南征 提交于 2020-01-01 19:06:33
问题 I have spent two day trying to figure it out. I have implemented two ways of working with mvvm popup windows Example of the first aproach usage: _childWindowController .ShowDialogWithResult<AddNationalityPopup,AddNationalityPopupModel, AddNationalityResult>( (result, a) => { if (a.DialogResult.HasValue && a.DialogResult.Value) { if (result.NationalityCountryId.HasValue) { Background.NationalityCountryId = result.NationalityCountryId.Value; Background.NationalityDescription = result

how to add context menu to WebBrowser wp7?

一个人想着一个人 提交于 2020-01-01 18:27:27
问题 Is it possible to add Context Menu to WebBrowser in WP7?(like IE) silverlight toolkit Context Menu not support WebBrowser!!! 回答1: The WebBrowser does not support context menus and doesn't function like other Silverlight controls. Therefore, it's not possible to directly add a ContextMenu. However, there are workarounds possible. One of them is to use the InvokeScript method. You should read this thread. Apparently the code at the bottom of the thread works. Note: GINternet is the WebBrowser