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


Top 5 Contributors of the Month
david stephan
Asad Ali
Fauzul Azmi
Post New Web Links

Why does my InputBinding stop working?

Posted By:      Posted Date: September 30, 2010    Points: 0   Category :WPF
 

I have a RelayCommand class:

 

 

public
 class
 RelayCommand : ICommand
{
 private
 Action<object
> _exec;
 private
 Func<object
, bool
> _canExec;

 public
 RelayCommand(Action<object
> exec, Func<object
, bool
> canExec)
 {
  _exec = exec;
  _canExec = canExec;
 }

 public
 void
 Execute(object
 parameter)
 {
  _exec(parameter);
 }

 public
 bool
 CanExecute(object
 parameter)
 {
  return
 _canExec(parameter);
 }

 public
 event
 EventHandler CanExecuteChanged;
}

 

I define three Commands in my ViewModel:

 

StepNext = 
                                     
                                            
                                        

View Complete Post


More Related Resource Links

Retract custom master page feature and all site pages stop working

  
There is a requirement to apply custom branding on personal sites in a SP 2010 project. For this I have created a feature which uploads and applies the custom master page on creation of any new personal sites.   I have stapled this feature (using feature stapling concept) to the “SPSPERS” (personal site) site definition. The custom master page is displayed on the creation of new personal sites. On feature deactivation, I am looping through all the personal sites (as the feature is deployed on a team site) and pointing the master URL back to v4.master. But when I retract the solution and browse to the personal site, I am getting a “404 File not found” error.  But am able to view the settings page by typing the URL.   I activated the publishing features and looked at the master page applied to the personal site. It was pointing to v4.master.   Any help on this is appreciated. Regards, Neha

Retract custom master page feature and all site pages stop working

  
I have stapled this feature (using feature stapling concept) to the “SPSPERS” (personal site) site definition. The custom master page is displayed on the creation of new personal sites. On feature deactivation, I am looping through all the personal sites (as the feature is deployed on the root site) and pointing the master URL back to v4.master. But when I retract the solution and browse to the personal site, I am getting a “404 File not found” error.  But am able to view the settings page by typing the URL.   I activated the publishing features and looked at the master page applied to the personal site. It was pointing to v4.master. Any help on this is appreciated. Regards, Neha    

WorkflowDesigner.Load causes Grid resizing mouse cursor to stop working.

  

Hi all,

We have a problem where WorklowDesigner.Load() causes the WPF Grid control's resizing mouse cursor not to come up. I have demo app written if anyone wants to double check. http://cid-467e12cdf12776bc.office.live.com/self.aspx/.Public/WpfApplication6.zip

 

If you just run the demo, you will see the resize cursor will work when you hover over the red grid splitters. However if you go into the wfusercontrol2 control and uncomment this line //wf.Load(new System.Activities.Statements.Flowchart()); , then run the application again you will notice the resize cursor does not show up when hovering over the  grid splitter.

 

It seems as though under the hood somewhere this exception occurs: Could not load file or assembly 'System.Activities.Presentation.Aero, Version=4.0.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35' or one of its dependencies. The system cannot find the file specified.

X509Certificate2Collection stop working

  

Hello

i have the falowing methos used on my website to capture client certificates that is instaled on the server and he works frequently well

 

        public X509Certificate2Collection ListarCertificados()
        {
            X509Certificate2 oX509Cert = new X509Certificate2();
            X509Store store = new X509Store(StoreLocation.CurrentUser);
            store.Open(OpenFlags.ReadOnly | OpenFlags.OpenExistingOnly);
            X509Certificate2Collection collection = (X509Certificate2Collection)store.Certificates;
            X509Certificate2Collection collection1 = (X509Certificate2Collection)collection.Find(X509FindType.FindByTimeValid, DateTime.Now, false);
            return (X509Certificate2Collection)collection.Find(X509FindType.FindByKeyUsage, X509KeyUsageFlags.DigitalSignature, false);
        }

 

The Problem is that for some times he works return the certificates but from a time to other he stop working and nothing return with no errors the only way to he become working again is to stop and start the Application Pool in IIS

Someone have and idea ???

Tanks
 


Retract custom master page feature and all site pages stop working

  

I have stapled this feature (using feature stapling concept) to the “SPSPERS” (personal site) site definition. The custom master page is displayed on the creation of new personal sites. On feature deactivation, I am looping through all the personal sites (as the feature is deployed on the root site) and pointing the master URL back to v4.master. But when I retract the solution and browse to the personal site, I am getting a “404 File not found” error.  But am able to view the settings page by typing the URL.

 

I activated

Rewrite URL stop working when moving to IIS 7.5

  

 Hello,

I am running a web project on IIS 7.5 and the rewrite stopped working. I am trying to rerun it with IIS 6 and everything perfect. only with IIS 7 it tells me that the page not found.

when I am using VS2010 to run the project then the rewrite solution works. when uploading it to the server eith IIS7.5 the page cannot be found....

 

Is there any changes with IIS 7.5 you can think of ?


Crawl schedule suddenly stop working

  

Hi All,

I would like to get technical advice from you guys. I have one SharePoint farm with 2 load balanced WFEs, 1 Index Server and 2 Clustered DB Servers. System has been up and running around 2 years already. A few months ago crawl schedule in SharePoint suddenly stop working. We can start Incremental crawl and Full crawl manually by using shared service web site. It simply not working by schedule. I've validated domain account for office search service and also default content access account.

Regards,

Soe Thu Aung


Working with SharePoint document libraries

  
Document libraries are collections of files that you can share with team members on a Web based on Microsoft Windows SharePoint Services. For example, you can create a library of common documents for a project, and team members can use their Web browsers to find the files, read them, and make comments. Users with Microsoft Office 2003 can check out and edit the files as if they resided on a local or network drive.

By default, your team Web site comes with a built-in document library named Shared Documents, which is listed on the Quick Launch bar as well as on the Documents and Lists page.

Working with DropDownList and ListBox Controls in ASP.NET

  
"In my application i am using dropdownlist to display all categories from a table. When the user clicks this control I display all records in that category. Category table also contains column called color.

I wanted display some categories in dropdown list different color and others in different color using ASP.NET."-Anonymous

Server side validation of Fileupload control not working

  
 

 


I've tried this method in my code behind to try and validate that the Fileupload control has a file or not. I get the error message the the event "Server Validate" cannot be found. Can anyone tell why? Thanks.


Public Sub CustomValidator1_ServerValidate(ByVal source As Object, ByVal args As System.Web.UI.WebControls.ServerValidateEventArgs) Handles CustomValidator1.ServerValidate
       

' Get file name

        Dim uploadAvatar As FileUpload = DirectCast(AdvertisementForm.FindControl("uploadAvatar"), FileUpload)

        Dim UploadFileName As String = uploadAvatar.PostedFile.FileName

        If UploadFileName = "" Then
            ' There is no file selected
            args.IsValid = False
        Else
            Dim Extension As String = UploadFileName.Substring(UploadFileName.L

Row command working on all rows not selected one?

  

Hi,

I have this code that hides a column in a gridview.  (The column houses another nested gridview).


    Protected Sub GridView1_RowCommand(ByVal sender As Object, ByVal e As System.Web.UI.WebControls.GridViewCommandEventArgs) Handles GridView1.RowCommand
        If e.CommandName = "Select" Then
            If GridView1.Columns(0).Visible = False Then
                GridView1.Columns(0).Visible = True
            Else
                GridView1.Columns(0).Visible = False
            End If
        End If
    End Sub


The trouble is that if I click the select link on one row that action to hide is carried out on all rows.  How can I set this up so that it only hides the row that is selected?


Thanks.


upload file not working

  

Hi,

iam using masterpage and ajax update panel, i have child page called  fileupload.aspx,i try to upload the file

but its not working , can i use updatepanel in child page , pls very urgent

looking forward for answer.




JQuery Treeview plugin is not working with Ajax page load in ie8

  

Hi there,

I developed a page where i m using jquery treeview plugin to generate tree. It worked fine on FF, IE8 with out ajax.

But when my page loads thro' ajax call in IE8, it is not collapsing or expanding tree.


Any idea?

Thanks in advance.



jquery confirm windows isn't working

  

Hi, i am using jquery to implement a modal confirm windows but it not working

i have a template field button with ajax confirm using jquery but i have a problem. Apper the confirm windows but when i click on "yes" doesn't execute the delete command. without ajax (using template field button and simple confirm windows javascript) works so well.

Can you give me a hand with this?

thx in advance!


<link href="_assets/css/StyleSheet.css" rel="stylesheet" type="text/css" />
<link href="_assets/css/confirm.css" rel="stylesheet" type="text/css" />
<script src="_assets/js/jquery-1.2.6.min.js" type="text/javascript"></script>
<script src="_assets/js/jquery.simplemodal-1.1.1.js" type="text/javascript"></script>

<script type="text/javascript">
  
$(document).ready(function() {
       $("#msg").text('');
       $(".deleteCustomer").click(function(ev) {
                ev.preventDefault();
                var msg = $(this).attr("title");
                $("#HiddenFieldRowId").val($(this).parent("tr").find(".id").val());
                confirm(msg + "?");
        });
})

Keyboard shortcuts stops working in WebMatrix

  

I'm often experiencing that keyboard shortcuts stops working in WebMatrix. This is very annoying as CTRL-S, CTRL-C, CTRL-V, etc. stops working, all of which are heavily used when programming. It's obviously hard to explain how to reproduce this, but I was wondering if someone knows a quick-fix?


update/delete not working on server only

  

my aspx page works in VWD, and everything works on the server EXCEPT update and delete sql functions. any ideas?

thanks 


New off line application working with sdf file. Need advice

  

Hey Folks


I am working on a project currently where I need to get data out of a 3rd party vendor's software that uses a .sdf file I looked this up and its a SQL CE file. I was hoping to just link to with with access but thats apparently not going to happen. I need to link to the database extract data from it to a csv file for later use. I also and most important I need to get the data from it and create a report that can be printed while on a customers site that my or may not have web access so I need for this program to be on and off line. I had my webapplication that I have been working on open and was able to bring up the sdf file under the server exploere however I can't seem to get anything out of it when I try to do grid views or detail views errors out.


Can I use one of Visual Studio projects to create this sort of applicaiton if so what would be the best approach. I would love to get an access odbc driver since office is allready installed on the employee's laptop's


Thanks

Capjlp



Categories: 
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