.NET Tutorials, Forums, Interview Questions And Answers
Welcome :Guest
Sign In
Win Surprise Gifts!!!

Post New Web Links

WPF 4 breaks DataTriggers?

Posted By:      Posted Date: September 02, 2010    Points: 0   Category :WPF
I've got the following code which works OK on WPF 3.5 SP1, but doesn't work on WPF 4:   <Window.Resources> <Style TargetType="{x:Type ComboBoxItem}"> <Style.Triggers> <DataTrigger Binding="{Binding RelativeSource={RelativeSource Mode=FindAncestor, AncestorType=ComboBox}, Path=(local:MainWindow.SomeAttachedProperty)}" Value="True"> <Setter Property="IsSelected" Value="{Binding IsSelected, Mode=TwoWay}" /> </DataTrigger> </Style.Triggers> </Style> </Window.Resources> <ComboBox x:Name="combo" ItemsSource="{Binding comboElements}" Margin="20"> <ComboBox.ItemTemplate> <DataTemplate DataType="local:ComboData"> <TextBlock Text="{Binding Name}" /> </DataTemplate> </ComboBox.ItemTemplate> </ComboBox> By "doesn't work" I mean the initial current selection is suddenly lost when the user clicks to open the combobox. First, the MainWindow shows up with the combobox, containing a correctly pre-selected item inside. However, when you click open that combo, it will suddenly clear its selection as its dropdown appears. The initial selection is set inside the MainWindow ctor: public MainWindow() {

View Complete Post

More Related Resource Links

Unwanted page breaks in rdlc report



I hav a report that has a table group =Fields!Location.Value

and in the cells I do this

=Avg(IIF(Fields!Contaminant.Value = "Element1", cDbl(Fields!Value.Value), cDbl(0)))

what I am getting is 1 row for each location then there is a pagebreak! what i want is the next location right below the  first I looked through for all the page breaks with no luck. Any ideas?

Bug? : Sgen breaks web-service serialization

I am using the noaa weather web service and it works fine if I have not run sgen on the assembly. I have sgen disabled in the project settings and instead run it explicitly in the main build. I run sgen using the command: sgen /a:myassembly.dll /force /compiler:/keyfile:myassembly.snkThis creates an [assembly_name].XmlSerializers.dll and when running the application again, the same call to the web-service fails with the following exception. This is internal to the web-service code so I'm stuck for what to do other than not run sgen:System.InvalidOperationException: There was an error generating the XML document. ---> System.ArgumentException: Item has already been added. Key in dictionary: 'myassembly.gov.weather.www.productType' Key being added: 'myassembly.gov.weather.www.productType' at System.Collections.Hashtable.Insert(Object key, Object nvalue, Boolean add) at System.Collections.Hashtable.Add(Object key, Object value) at System.Xml.Serialization.XmlSerializationWriter.AddWriteCallback(Type type, String typeName, String typeNs, XmlSerializationWriteCallback callback) at Microsoft.Xml.Serialization.GeneratedAssembly.XmlSerializationWriter1.InitCallbacks() at System.Xml.Serialization.XmlSerializationWriter.GetTypeEntry(Type t) at System.Xml.Serialization.XmlSerializationWriter.WriteReferencedElement(String name, String ns, Object o, Type ambientType)

COM Server upgrade breaks interface

Ok, so apparently I posted this question in the wrong group last time, so I'll try again :) ======= I have an ActiveX exe that I’m calling from a Web Service. The ActiveX exe however gets upgraded independently of the web service. When this happens the web service breaks. Looking in the registry, under HKEY_LOCAL_MACHING \ SOFTWARE \ Classes \ {DLL Name}  - the GUID seems to remain consistent after upgrading the EXE, however I’m guessing the interface GUIDs much change for some reason. Is there perhaps a GUID per interface that’s exposed that’s changing when the ActiveX EXE is recompiled? If so can someone tell me how to view these interfaces and confirm that his is or is not the case. ======= What I'm trying to figure out of why my Interop Proxy DLL stops working every time the developer of this ActiveX EXE releases a new version. As I said that GUID in the redistry seems to remain the same. I'm just not sure how to go about debugging the issue. I don't want to have to re-compile my application every time he releases a new version and he does not seem to think he's changing the interface - so something else must be changing when you /unregserver  /regserver the COM server \ ActiveX EXE. ========

Web Form breaks after using the browser's back button

I have a web form that allows a user to put some data in a textbox and click a button to do a search on that data.  It opens up a Sql Server Reporting Services report using the data they entered on the previous page.  If they use the browser's back button to go back and enter some different criteria to search on, the buttons don't work anymore. Any ideas or suggestions on what would cause this?   Thanks! 

Search crawler 'breaks' Document ID link

Hi all - we have a Sharepoint 2010 development server up and running (very much Out of the Box configuration). The Document ID functionality has been enabled and appears to be working OK - each document has its own unique ID as predicted. In a team site (Corporate Comms), we have a document library where our corporate logo has been loaded (a small .bmp file). This image file has a unique Document ID. On the top level site, I have created a link to the corporate logo so that it appears on the 'entry' web page. The link to the image is : http://<servername>/_layouts/DocIdRedir.aspx?ID=CH07-7-1  where CH07-7-1 is the Document ID When first created, everything works OK and the image appears on the front page. However, once a search crawl has been run (either full or incremental), the image disappears and is replaced by a red cross (i.e. the URL link has been broken). I have tried this with a word document link (as opposed to a .bmp image) and this still works OK. I have also tried storing the image in a picture library (as opposed to a document library) and the same thing happens. Is there something funny happening specific to the .bmp image/Document ID/crawler ? Anything I need to configure ? Any help would be appreciated. Thanks, Richard.    

Updating an InfoPath Form Library Template breaks preexisting SharePoint List Views

When updating an InfoPath template (e.g. adding a new field), any views I have created on the library lose their filters and sorting, as if the columns on which they were built no longer exist.  Has anyone else encountered this and, if so, is there a solution? V/r Noelle

LoginAdapter breaks the log-in

When I turn on the LoginAdapter, the Login control no longer does a successful login. When the user clicks the LogIn button, a postback takes place, but the user is not authenticated. After the postback there are red asterisks next to the username and password fields, which are now empty. * I have declared a custom LoginProvider, but *none* of the methods of the LoginProvider are ever called - I set a breakpoint in each function to be sure. When I disable the LoginAdapter, my provider's ValidateUser is called normally. * I listened to all login-related events of the Login control. None are fired. * I also set a breakpoint on all CLR exceptions. None are thrown.   The login control is vanilla:<%@ Page Language="C#" MasterPageFile="~/Simple.master" AutoEventWireup="true" CodeFile="Default.aspx.cs" Inherits="Login_Default" Title="Untitled Page" %> <asp:Content ID="Content1" ContentPlaceHolderID="cphRoblox" Runat="Server"> <asp:Login ID="Login1" runat="server" /> </asp:Content>  Here is the rendered page: <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> <html xmlns="http://www.w3.org/1999/xhtml"> <head><title> Untitled Page </title><link href="../App_Themes/RobloxDefault/Frontpage.css" type="text/css" rel="stylesheet" /><li

Survey: Add sentences, titles, groups, page breaks?

Hi community I want to add different things to a sharepoint survey. - Title between questions - create question groups - add a finishing sentence like "Thank you for your time...". - choose the page break manually Does anybody know if it is possible and how? Thx

List Display View - Line Breaks?

Hi, I have customised a list display form to display the content from the list differently. I am having a problem when I try to output the content from a multiline textbox - the display form puts it all on the one line. This is the tag that I am using to display the description <xsl:value-of select="@description"/> Is there another tag that I can use to display the linebreaks in the description field in the list in this output? Thanks in advance for any help Kind Regards, Michael

Modifying Customizing EditForm.aspx of Doc lib breaks Upload function - Unknown Error

Part of a bigger design issue really. But does anybody know why customizing EditForm.aspx of a Doc lib breaks the Upload function? and how to fix it so it does not. My version of the editform works great, but after an upload I get Unknown Error the resulting url looks like this: https://xxxxx.edu/sites/xxxx/_layouts/Upload.aspx?List=%7b0404432B-91A3-4E18-9202-5954E3A7E0D2%7d&RootFolder=%2fsites%2fmcpharm%2ftest3&Source=https%3a%2f%2fxxxxx.edu%2fsites%2fmcpharm%2ftest3%2fForms%2fAllItems.aspx --- The bigger design issue - disregard if you like: That said, the bigger design issue is we are trying to relate one list row to many documents, but don't want to seperate the docs into seperate folders and would like the solutoin to be seamless. We are going to add a look up from the doc lib to the list, but did not want to use anythng but the List's ID column. However, we do not want users to have to manually look up List row IDs in that form, and we did not want to use a list column that can be edited, even if we can add a unique column policy. My design and thinking is to build a few custom pages with dataviews to show row level details in both lists (1 to many) and a dataview to drive list level functions like edit, delete and upload docs. I think all the pieces are there except for the less than graceful upload function that fist uploads the file and then asks the

Line chart with no breaks over empty values

I'm sure that I'm just missing a property but I can't find it.  I have a line chart with a contiguous range of dates on the X-axis.  If the series field has an empty value, I'd like to see the line plotted from the previous non-empty point to the next non-empty point rather than seeing a break in the line for that date.  Thanks in advance.Paul Turley, MVP [Hitachi Consulting] SQLServerBIBlog.com

feature stapling done against site definition breaks when saving site as a template?

Hi, we have a bunch of feature stapling done against some of our site definitions on a solution we are working on. This feature staple has a bunch of feature dependancies which all work in a variety of ways. One of these dependancies then uses a feature receiver class to do some post provisioning setting up of web part connections and the like. This all works very well when creating a new site from a site definition etc etc. The problem arises when a user opts to provision a site in this way, and then uses the 'save as template' function within sharepoint. (BTW this is WSS 3.0 / MOSS). The site template saves correctly, but now the feature receiver never runs. I'm assuming this is because the associated feature staple doesnt run either? I've looked around and seen some reference to feature stapling not working against templates. Is this true? 

Sharepoint Designer 2010 modified view breaks "hyperlinks" column and formats all hyperlinks to the

I have been trying to perform a simple task with sharepoint designer 2010 that keeps breaking one of my list colums (in the custom view that is).  Background:  I have a list that we are using to assist with Document control in our organization.  The list consists of a few columns: Document number, Title, Owner, Doc Type, and file link (hyperlink to a pdf).  When I create a new out of the box standard view, everything works as desired.  However, I need to adjust the column widths on a couple columns in SharePoint designer, which seems to break the file link column functionality (all of the hyperlinks are now formatted to go to the same document, thought the file paths in each list item are correct).  Funtionality of the file links column works perfectly, until I make a single change to the view in SharePoint designer and save.  Any insight on this issue would be greatly appriciated.  

How to show breaks

Hi Expert:I have a field with three lines in the database like:test1test2test3When using the code below:<%# DataBinder.Eval(Container.DataItem, "material") %>The data will be retrived in one line like this:test1 test2 test3 How to code the breaks of the filed? Appreciate it !

XMLDocument Save() Method inserting unwanted line breaks

(Visual Studio 2005, .NET framework ver. 2.0 sp1, C#)   Hi all - I hope there's a some simple solution for this. I have a SQL Server 2005 (.dtsx) SSIS package file which I open and make a slight change to, then save it back. The problem is that the resulting saved file differs from the original, even if i haven't made any programattical changes at all.   Specifically, if i do something like this:   using System.XML; XmlDocument doc = new XmlDocument();doc.Load(DTSXFile);doc.Save("TEST-COPY_" + DTSXFile);   So I found that even if i completely remove any modifications i was making, and break it down so that all I am doing is simply loading the file, and then turning right around and saving it, I get line breaks inserted for nodes that have empty values...I looked over the entire file, and the issue is not happening if there is a value...only in the case where the value is missing.   a line like this in the source file: <DTS:xProperty DTS:Name="VersionBuild">7</DTS:xProperty>   comes over perfectly after saving as this: <DTS:xProperty DTS:Name="VersionBuild">7</DTS:xProperty>   But, in the source file, a line like this (empty value): <DTS:xProperty DTS:Name="VersionBuild"></DTS:xProperty>   will end up looking like this in the TEST-COPY file after saving: <DTS:xProperty DTS:Name="VersionBuil

RDL rename breaks all references to expressions and report properties code in BIDS

I have done a 'save as' in BIDS and changed the name of the file from ordreqn-lab.rdl to ordreqn-ptheader-per-order.rdl.  The report has custom code in the report properties and expressions that are based on that code.  After renaming this report I get 100 errors all rsFieldReference errors basically saying the expressions and fields are not referring to the current dataset. Version info: SQL 2008 R2. Any assistance would be greatly appreciated. I did notice there is another rename bug.  Is this a bug also and if so what is the status of a fix. Please let me know if I can provide further information. I don't see a place to attach the rdl. http://social.msdn.microsoft.com/Forums/en-US/sqlreportingservices/thread/564f5031-e832-4666-ab52-29391b74b955/

Routing breaks links

Using: .Net 4.0/C#/VS 2010 Express/ASP.NetImplemented the Routing as described here: http://msdn.microsoft.com/en-us/library/cc668202(VS.90).aspx.Here is my application: I have created a blog, the main page of which is called "default.aspx."  Default.aspx contains a series of links to posts, each with a unique link.  To get to an individual post, I utilize routing, using this URL format: http://localhost:55074/WebSite3/2010/9/15/this-is-a-test-post~4.  i parse the URL to get the year/month/date of the post, as well as the post title.This works fine.The problem occurs when I go to an individual post.All the links are broken.For example, I have a link at the top that takes you back to default.aspx (in the html, I have the link set up like this: <a href="default.aspx">Home</a>), except that now the link takes me here:  http://localhost:55074/WebSite3/2010/9/15/default.aspx.Obviously, there are no 2010, 9, or 15 subdirectories, and default.aspx is in the root directory.Also, when I load an individual post, Request.Url.AbsolutePath returns this: /WebSite3/2010/9/15/this-is-a-test-post~4.thanks.
ASP.NetWindows Application  .NET Framework  C#  VB.Net  ADO.Net  
Sql Server  SharePoint  Silverlight  Others  All   

Hall of Fame    Twitter   Terms of Service    Privacy Policy    Contact Us    Archives   Tell A Friend