wpf,binding,charts,wpftoolkitRelated issues-Collection of common programming errors
Buzby
c# wpf entity-framework dbcontext n-tier
There’s a certain amount of background to get through for this one – please bear with me!We have a n-tier WPF application using EF – we load the data from the database via dbContext into POCO classes. The dbContext is destroyed and the user is then able to edit the data. We use “state painting” as suggested by Julie Lerman in her book “Programming Entity Framework: DBContext” so that when we add the root entity to a new dbContext for saving we can set whether each child entity is added, modifie
Adam Badura
wpf data-binding
How to skip updating some of the sub-bindings of a MultiBinding? I have defined in code-behind (I had some troubles making it in XAML and I don’t think it matters – after all code-behind is not less expressive then XAML) a MultiBinding which takes two read-only properties and one normal property to produce a single value. In case of ConvertBack the read-only properties are not modified (they sustain their value) and only the normal property is changed.While defining the MultiBinding the entire M
joshxdr
c# wpf xaml
I am a newbie to WPF/XAML. I would like to get an error message if I bind to the wrong data type in XAML. It seems that XAML wants all binding to be through strings, but there are no error messages if you use an int or double by mistake.I have found this XAML code here:<ItemsControl ItemsSource=”{Binding Path=PointList}”><ItemsControl.ItemsPanel><ItemsPanelTemplate><Canvas /></ItemsPanelTemplate></ItemsControl.ItemsPanel><ItemsControl.ItemTemplate><Da
Dave Clemmer
wpf validation validationrules
I have a page where a few textboxes cannot be empty before clicking a Save button. <TextBox…<TextBox.Text><Binding Path =”LastName” UpdateSourceTrigger=”PropertyChanged”><Binding.ValidationRules><local:StringRequiredValidationRule /></Binding.ValidationRules> </Binding></TextBox.Text>My rule works. I have a red border around my textbox until I enter a value. So now I want to add this validation rule to my other text b
devuxer
wpf xaml
Here’s the Window declaration:<Windowx:Class=”Pse.ExperimentBase.SplashWindow”xmlns=”http://schemas.microsoft.com/winfx/2006/xaml/presentation”xmlns:x=”http://schemas.microsoft.com/winfx/2006/xaml”Style=”{StaticResource _windowStyle}”WindowStartupLocation=”CenterScreen”WindowStyle=”None”>Here’s the Style declaration:<Stylex:Key=”_windowStyle”TargetType=”Window”><SetterProperty=”Width”Value=”{Binding Path=InitialWindowWidth}” /><SetterProperty=”Height”Value=”{Binding Path=Ini
H.B.
wpf datatemplate itemscontrol
I found some unexpected behavior in my WPF program. I have a DataTemplate to visualize my data in an ItemsControl. <ItemsControl ItemsSource=”{Binding All}” ><ItemsControl.ItemTemplate><DataTemplate><Result:ResultItem/></DataTemplate></ItemsControl.ItemTemplate><ItemsControl.ItemsPanel><ItemsPanelTemplate><WPFLibrary:MyPanel Rows=”2″ MinRows=”4″ MaxColumns=”2″ IsItemsHost=”true” /></ItemsPanelTemplate></ItemsControl.ItemsPanel>&
Russell
wpf windows-7
We have a system built using WPF and have (until recently) been developing using Visual Studio 2008 SP1 and Windows XP SP3. We have upgraded some of our development boxes to windows 7 and we have discovered we are getting some unexpected behaviour when running our applications. Some controls do not display at all.Has anybody else experienced issues like these and if so, how can we make them work?Thanks in advance.
DanteTheEgregore
c# wpf xml
I’m currently having a problem in which I get a NullReferenceException from the following method:public void LoadValueXML(){XDocument myxml = XDocument.Load(@”config.xml”);Items = myxml.Element(“Values”).Elements(“Item”).OrderBy(x => x.Attribute(“ID”));ItemsLength = Items.Count();}The fourth line in the method in which I try to set the Items variable is generating the exception. My XML document is formatted like so:<?xml version=”1.0″ encoding=”utf-8″ ?> <Values><Item ID=”1″ Ty
Samuel Slade
wpf clipboard clipboarddata
I am having a problem regarding clipboard and I get this error message every time I try to make a copy / paste operation from an Excel file.The code breaks at Clipboard.GetDataObject() and the message error is this:OpenClipboard Failed (Exception from HRESULT: 0x800401D0 (CLIPBRD_E_CANT_OPEN))My WPF application is already running when I open Excel, write some text and then try to copy / paste. The code that I’m using is this:private void SetClipboardData() {IDataObject data = Clipboard.GetDataOb
Sogalas
c# wpf gui
I’m trying to apply transparent background to a listbox but I get a strange rendering.The listbox itself is transparant but the border is so transparent that it overrides the background!Here is the screenshot that demonstrate the problem: http://img10.imageshack.us/i/transparentborder.png/I’ve tried the following without success:On the ListBoxBackground=”{x:Null}” BorderThickness=”0″ BorderThickness=”{x:Null}”On the container and the scrollviewer the same properties but unsuccessful. I made othe
Anders
asp.net-mvc-3 binding query-parameters
I have a queryparameter named “from” (a from date) and also a input which binds to a property named FromIn my ViewModel contructor i set the From property to a date…This works if the query parameter name and the property name are different, but if they are same MVC3 with some magic takes whatever value there are in the query param and binds against that, it does not care what value are in the From property.. Why? this atuomagic is so wrong on so many levels! How do I disable it?edit: It doesnt
akjoshi
wpf binding wpfdatagrid frameworkelementfactory
I have a problem with an undesired source update in the OneWayToSource, UpdateSourceTrigger.Explicit scenarioBackground: I have a DataGrid containing user data with a password column. I have derived the class DataGridPasswordColumn from DataGridTemplateColumn toDisplay some dummy masked data in the non-edit mode (e.g. ####) This is done by setting the CellTemplate to a TextBlock with a constant value:FrameworkElementFactory frameworkElementFactory = new FrameworkElementFactory(typeof(TextBlock))
Uros
android binding mvvmcross
This post is based on a previous question I posted on stackoverflow. I found the solution to my problem, but I am posting this question becouse I suspect this is a bug in the MvvmCross platform. The question can be found on: Custom ToggleButton in Xamarin.Android. To replicate the behavior follow this steps:Extend the ToggleButton(I found this issue with toggle button but I guess it is the same with other UI elements) and create the listener for the click event:public sealed class MyToggleButton
blueoliv
flex binding readonly arraycollection bindable
I have noticed an unexpected behaviour with binding in Flex, my code is as follow :Application code<mx:Application xmlns:mx=”http://www.adobe.com/2006/mxml” layout=”vertical” horizontalAlign=”center” xmlns:Model=”Model.*”><mx:Script><![CDATA[import Model.DataDummy;]]></mx:Script><mx:HBox width=”100%” horizontalGap=”30″><mx:Button id=”buttonChange1″ label=”Change property value” click=”myDummy._resetMyProperty();” /><mx:Label id=”labelRaw” text=”{‘My Propert
Joe
python binding cpython dynamic-binding
In asking a question about reflection I asked:Nice answer. But there is a difference between saying myobject.foo() and x = getattr(myobject, “foo”); x();. Even if it is only cosmetic. In the first the foo() is compiled in statically. In the second, the string could be produced any number of ways. – Joe 1 hour ago Which got the answer:Eh, potato / solanum tuberosum… in python, niether is statically compiled, so they are more or less equivalent. – SWeko 1 hour agoI know that Python objects’ memb
Quaestus
wpf xaml mvvm binding
Why XAML binding succeeds to this in my view model: private string _testStr = “Test”;public string TestStr{get { return _testStr; }}But not to this:public string TestStr = “Test”;Am I missing something?Thanks.
baye dbest
wpf xaml binding runtime
I have the following Canvas which has 3 elements:<Rectangle x:Name=”start” Canvas.Left=”20″ Canvas.Top=”100″ Width=”25″ Height=”25″ Fill=”Pink”/><Line X1=”{Binding ConverterParameter=X, ElementName=start, Converter={StaticResource CanvasPositionConverter}}” Y1=”{Binding ConverterParameter=Y, ElementName=start, Converter={StaticResource CanvasPositionConverter}}” X2=”{Binding ConverterParameter=X, ElementName=root, Converter={StaticResource CanvasPositionConverter}}” Y2=”{Binding Convert
Sonny Boy
c# wpf class binding struct
I’ve recently encountered an issue where I have an ObservableCollection bound to a ListView. People is a structure which I have written. So long as I set the value(s) of the People objects prior to binding, everything seems to work OK. However, when I try to set the values from the GUI at runtime, the underlying objects do not seem to reflect the change.I finally overcame this problem by simply changing People from a structure to a class. No other changes were necessary.Can someone please ex
Doug
wpf xaml data binding observablecollection
I’m stumped here. I have an observable collection that holds business objects. I have it bound to ItemsSource of a ListBox. I am updating the X and Y of my object and it is being displayed correctly in the UI during runtime as it is bound the the Item top and Left. But, here is where the problem is. I have also bound some data to be displayed in textblock text property and the data only displays the initial value. It never updates the textblock Text no matter how many times I change it.Here is t
Brent Arias
c# .net interface binding clr
In Wagner’s “Effective C#,” item 23, he explains that interface methods are notvirtual…they are a declaration of aconcrete implementation.I find that to be a conundrum, because it means that interface methods represent early binding, and yet they have the behavior of late-binding. It rouses curiosity of how they work under the covers. In C++ this would turn into a discussion of vtables. In C#, I don’t know what it turns into. Can someone spell it out?p.s. This question has a cousin, but th
Terrarium
ruby-on-rails flash charts
Hi Folks thanks for your help here. I am trying to create a rails controller in ubuntu terminal with “rails generate controller test_it”But I keep getting a screwy error. What does this mean?/usr/lib/ruby/gems/1.8/gems/activesupport-3.2.1/lib/active_support/dependencies.rb:245:in `load’: /tmp/rubygems-1.8.17/first_app/config/initializers/session_store.rb:3: syntax error, unexpected ‘:’, expecting $end (SyntaxError) …sion_store :cookie_store, key: ‘_first_app_session’
Phil Cross
javascript jquery charts google-visualization
I’m trying to export some data generated by our server, and import it into Googles Column Chart.I’ve read the documentation regarding using JSON to import from the server, however, I’m not using a pie chart, and they haven’t given much information about how they generate the JSON, and the format it quite different between a pie and column chart.My server is currently returning the following code:[[‘Week’, ‘Present’, ‘Absent’, ‘Other’], [‘Week 1’, 2, 0, 0],[‘Week 2’, 0, 0, 0],[‘Week 3’, 0, 0, 0],
user2552331
c# vb.net visual-studio-2010 charts axis-labels
I have made a chart and added the points on runtime. The data is plotted as Chart1.ChartAreas(0).AxisX.IntervalType = DateTimeIntervalType.Weeks Chart1.Series(“PH”).Points.AddXY(DateTime.Parse(dr.Item(“readtime”)).ToString(“MM-dd”), dr.Item(“ph”)) The data that is plotted holds 7 days of data. As shown below, the date is repeated.How to achieve the x axis showing only 11-08, 11-13, 11-14 in this case?Here is a sample data
ChrisF
c# wpf charts toolkit
<Window x:Class=”tradtest.chart” xmlns=”http://schemas.microsoft.com/winfx/2006/xaml/presentation” xmlns:x=”http://schemas.microsoft.com/winfx/2006/xaml” xmlns:toolkit=”http://schemas.microsoft.com/wpf/2008/toolkit” xmlns:charting=”clr-namespace:System.Windows.Controls.DataVisualization.Charting;assembly=System.Windows.Controls.DataVisualization.Toolkit”Title=”chart” Height=”300″ Width=”500″> <Window.Resources><Style x:Key=”SimpleLineSeriesStyle” TargetType=”charting:LineDataPoint
Eric
.net winforms charts
I’m looking for a WinForm.Net chart control that has more feature on user interactivity. A few specific thing that I have in mind:Multiple selection of the bars/bubble Drag-drop support of the bars/bubble out of the chart control Auto highlight on mouse-hoverAny suggestion.Thanks~ Eric
hiro
reportviewer charts
I am using visual studio 2010 coding with VB. I have reportviewer control with a chart on the report. How do you programmatically change an axis group expression for a chart in an rdlc report. For instance i have the group expression: MonthName(Month(=Fields!receiveddate.Value)) .How can I change this to: Week(=Fields!receiveddate.Value) at runtime via code?Thanks in advance!
John Saunders
c# ms-access charts
I have to create charts with dynamic datasource, I have a code. It does not show error but the graph is also not visible on runtime.Here out_table is the name of my table and ADX is one of its column.code:OleDbConnection con1 = new OleDbConnection(@”PROVIDER=Microsoft.ACE.OLEDB.12.0;DATA SOURCE=RS.accdb”); String sqlo = “Select ADX from ” + out_table + “”; OleDbCommand myCommand = new OleDbCommand(sqlo, con1); myCommand.Connection.Open(); OleDbDataReader myreader = myCommand.ExecuteReader(Comman
bootkick
charts google-visualization bar-chart google-charts-api gantt-chart
I have the following sort of gantt chart coded up using Google Charts, but I would like to assign different color to each bar. Now in my case since I am assigning a transparent color to spacer , I dont understand how I can assign a different color to each remaining bar. This probably comes down to assigning the same series in different bars different colors.Can someone help me out with fixing this?http://jsfiddle.net/bootkick/hp2yr/google.load(‘visualization’, ‘1’, {packages: [‘corechart’] }); g
skaffman
asp.net repeater charts
I’m getting the error “Microsoft JScript runtime error: Sys.WebForms.PageRequestManagerServerErrorException: Error executing child request for ChartImg.axd” at runtime from my Chart control. I have read one solution to this error message as documented here: http://social.msdn.microsoft.com/Forums/en-US/MSWinWebChart/thread/1dc4b352-c9a5-49dc-8f35-9b176509faa1/ but this does not solve my problem.I have the Chart within a Repeater control, which is within an ajax UpdatePanel. When I take the cha
JD Isaacks
flex actionscript-3 charts
Basically the default behavior of the horizontal axis of the line chart is to graph each plot “as is” for example if you had this data:<data value=”5″> <data value=”6″> <data value=”7″>would graph, 5|6|7I would like to make it graph so that it is adding to a value as it goes horizontally so it would graph the numbers like this: 5|11|18 as each step it is adding the value. so first you have 5, then you have 5+6 = 11, then you have 11+7 = 18. So the graph is always going up (unle
Nate
c# wpf data-binding wpftoolkit
I have a Chart control, that Binds to an Observable Collection Property in the DataContext, all works fine but when i create a new “Object” in the DataContext (Data Context Changed) and never a previous “Object” was showed before, and then I select another “Object”. An exception is throwed, said some thing like this: “A transition tree is current” or some thing like this.
james1983
wpf wpf-controls clickonce wpftoolkit lan
I am trying to deploy my WPF application to some users who are outside of our corporate network. Everything works great on our LAN but I can’t get the updates working when I turn on security as the user is never prompted for their login details?Does anyone know of a way to secure my ClickOnce files so that only my users can access it? I am not allowed to put this software up without it being secure.Any help much appreciated.
S3ddi9
c# wpf wpftoolkit
Am unable to set the default flowdirection property for the WPF Toolkit Extended 1.6 MessageBox dynamically, is there any way to do that in code & at runtime knowing that I’ve a static field myFlowDirectioni’ve tried its working fine & it changes the flow but i need it dynamically<Style TargetType=”{x:Type toolkit:MessageBox}”><Setter Property=”FlowDirection” Value=”RightToLeft”/></Style>this MessageBox can’t be derived & has no constructor
Greg
c# .net wpf xaml wpftoolkit
Any advice how to fault find to work out why the Grid.Resources styles in this XAML is not making any difference it seems to the end result? Note I’m using Charting from the WPFToolkit so to adjust how a chart looks it seems one has to apply the style areas (suggested by someone on the forum). So my question is generically, noting I’m trying to adjust the look of a 3rd party graph, how can I debug/fault-find to understand what’s going wrong? Is there a debugging trick? For example when I in
dks1983
wpf datagrid command wpftoolkit
Is there any way I can associate a Command with a DataGridHyperlinkColumn? I’ve tried this:<DataGridHyperlinkColumn Header=”Client Name” Binding=”{Binding ShortName}”><DataGridHyperlinkColumn.ElementStyle><Style TargetType=”TextBlock”><Setter Property=”Hyperlink.Command” Value=”{Binding DataContext.NavigateToClientCommand, RelativeSource={RelativeSource FindAncestor, AncestorType={x:Type local:ClientsSummaryView}}}”/><Setter Property=”Hyperlink.CommandParameter” Value
CityView
c# wpf silverlight wpftoolkit silverlight-toolkit
I really like some of the pre-built controls available in the Silverlight 4 ToolkitI understand the CLRs are different but I was hoping that I could download the source and recompile for the CLR that WPF uses.Is this possible? The WPF Toolkit is very basic by comparison and doesn’t have encouraging reviews.Many Thanks.
Taylor Leese
c# wpf visual-studio-2008 wpftoolkit
I’ve encountered an issue where Visual Studio hangs in WPF design view. I’ve read through similar posts and I believe my issue is similar, but different. The errors I see in Windows Event Viewer are below.Hanging application devenv.exe,version 9.0.30729.1, hang modulehungapp, version 0.0.0.0, hang address0x00000000..NET Runtime version 2.0.50727.3053 -Fatal Execution Engine Error(7A2E0F92) (0)I’ve noticed that the issue only occurs when I have the Properties window open during design view. Other
Edward Tanguay
c# wpf datagrid wpftoolkit
The following WPF code displays the contents of FirstName and ZipCode in the WPF Toolkit DataGrid.However, I don’t want to just display the data as it is but slightly modified, e.g. I might want to display all the zipcodes to display with a “-0000” on the end, or I may want to display “n/a” if a cell is blank.I could only find CopyingCellClipboardContent which doesn’t seem to do what I want.I’m thinking I might need a Converter but am not sure how to go about it in this example.How can I manipul
Constant Learner
wpf wpf-controls wpfdatagrid wpftoolkit
We have WPF application, In which we use DataGrid on one form. At runtime, when we Enter value in DataTemplate column, I need to Show SUM of that specific column in DATAGRID Footer. So when each time I change value in any Cell of That AMOUNT column, The correct SUM of that column need to be display. Which event I should try. I have tried this code , But it need to press tab each time, it does not display Correct SUM.private void dgInfo_RowEditEnding(object sender, Microsoft.Windows.Controls.Dat
kasun.s
C# WPF wpftoolkit
Here I am trying to edit / update my SQL Server DB using dataGrid. 1st I load the values to datagrid. Then Trying to change any value of a cell by double clicking cell. But, after I move the cursor, previous value comes to the cell. So same value saves to DB, not the changed value I wanted to save. The deleting code works fine. As my knowledge I think C# code is working fine. Only the problem that datagrid cell value cannot change. Please advice that do I need to change any datagrid property val
Web site is in building