Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • World
  • Users
  • Groups
Skins
  • Light
  • Cerulean
  • Cosmo
  • Flatly
  • Journal
  • Litera
  • Lumen
  • Lux
  • Materia
  • Minty
  • Morph
  • Pulse
  • Sandstone
  • Simplex
  • Sketchy
  • Spacelab
  • United
  • Yeti
  • Zephyr
  • Dark
  • Cyborg
  • Darkly
  • Quartz
  • Slate
  • Solar
  • Superhero
  • Vapor

  • Default (No Skin)
  • No Skin
Collapse
Code Project
CODE PROJECT For Those Who Code
  • Home
  • Articles
  • FAQ
Community
S

StyleGuide

@StyleGuide
About
Posts
43
Topics
17
Shares
0
Groups
0
Followers
0
Following
0

Posts

Recent Best Controversial

  • Filtering ObservableCollection
    S StyleGuide

    What is the best method for filtering an ObservableCollection in a ViewModel. I am using the MVVM approach. I will use multiple parameters. Thanks very much, Jon

    WCF and WF wpf architecture question

  • Binding a Text Box to Data Context
    S StyleGuide

    Hi there, I'm new to WPF, so bear with me.. I have a Main View, and a view within it. I set the DataContext in my 'OnStartup' C# method: Views.MainView view = new Views.MainView(); view.AssignmentView.DataContext = new ViewModels.MainViewModel(_assignmentDataSource); I have previous / next button in my 'AssignmentView', that are linked to commands. This Moves focus from record to record as expected in my ListView, in my XAML : I think its a problem with the 'DataContext' - I don't think I should be wiring it up in the Stack Panel, but when I remove it, there is no data in the Stack Panel text box.. Where am I going wrong? Any help greatly appreciated. Thanks. Jon bgfbgf

    WPF wpf csharp help wcf data-structures

  • C# Excel and Threading
    S StyleGuide

    Thanks Mark, I will try the back call. Sorry, was a rather vague there, my Application and Workbook objects are in the same class (Excel class) which is not in the Form class (obviously). Thanks very much for the help, Jon

    C# csharp com design help question

  • C# Excel and Threading
    S StyleGuide

    Hi There, I have a background worker thread on my Form. In 'DoWork' A call is made from the thread to pump data out to Excel. The visible property of my Excel Application is set to false until 'RunWorkerCompleted' (there may be a lot of data and the users don't want to see it being churned out) when visible is set to true, I also use the .Activate method :

    excelApplication.Visible = true;
    ((Microsoft.Office.Interop.Excel._Workbook)excelWorkbook).Activate();

    Everything works fine except the Excel appears behind my form - not the front.. annoying .. in addition its only happening on my tester's machine (typical!) and not mine. It is the last code that executes.

    excelApplication

    and

    excelWorkbook

    are in a different class which I suspect is the root of the issue, also it needs to be inside the thread so the UI is not affected when the form is moved around and such like. Any ideas? Thanks very much Jon

    C# csharp com design help question

  • Select all Text in TextBox and Set cursor to Start
    S StyleGuide

    Ok cheers, I'll have a further play. Jon

    C# question

  • Select all Text in TextBox and Set cursor to Start
    S StyleGuide

    Great - Thanks for the Tip Dave

    C# question

  • Select all Text in TextBox and Set cursor to Start
    S StyleGuide

    Thanks John, But the cursor is still placed at the end of the Text.. Jon

    C# question

  • Select all Text in TextBox and Set cursor to Start
    S StyleGuide

    Hi there, I'm trying to Select All text in a text box and set to cursor position to 0. I've tryed a few things including :

            this.textBox1.SelectionStart = this.textBox1.Text.Length;
            this.textBox1.SelectAll();
    

    however this sets the cursor position to the end of the Text. Any ideas? Thanks Jon

    C# question

  • StringBuilder ' escape sequence
    S StyleGuide

    Thanks Vikram, d@nish, Thanks for the tip Vikram. d@anish - Yes you're right, however I get the error when applied to my namesBindingSource Thanks Jon

    C# help question

  • StringBuilder ' escape sequence
    S StyleGuide

    Thanks for this Bekjong, Sorry - I forgot to say I am getting the error on this line:

    namesBindingSource.Filter = sb.ToString();

    Thanks Jon

    C# help question

  • StringBuilder ' escape sequence
    S StyleGuide

    Hi there, Can anyone suggest the best way, or point me in the direction of, escaping or qualifying an ' (apostrophe) character within a StringBuilder? Unsurprisingly, I get a 'Missing operand after' error with the following:

    sb = "LastName = 'O'Brien'"

    Thanks Jon

    C# help question

  • Text Box Selection
    S StyleGuide

    Great! Thanks Jeff

    C# question

  • Text Box Selection
    S StyleGuide

    hmmmm.. Thanks Jeff, I'm calling it in the Enter event of the text box..

    C# question

  • Text Box Selection
    S StyleGuide

    Thanks Jeff, this.txtName.SelectionStart = 0; Correctly sets the cursor position to 0, but when I add: this.txtName.ScrollToCaret(); this.txtName.SelectAll(); All text inside the textbox is selected, but the cursor position is now at the end of the selection.. Any ideas? Thanks.

    C# question

  • Text Box Selection
    S StyleGuide

    Thanks for this CKnig, but no joy :-(

    C# question

  • Text Box Selection
    S StyleGuide

    Hi there, Does anybody know how I can select the entire contents of a text box from the end to the start? (thus allowing the start to be displayed in the text box, if the text is too long to fit). Below is (obviously) selecting from left to right: this.txtName.SelectionStart = 0; this.txtName.SelectionLength = txtName.Text.Length; so I need something like: this.txtName.SelectionStart = txtName.Text.Length; this.txtName.SelectionEnd = 0; but Text Box has no SelectionEnd Property... Thanks!

    C# question

  • Force Dropdown of a DateTimePicker
    S StyleGuide

    Hi there, How do I fire the DropDown event of the DateTimePicker control? I'd like to fire the event from another control. Thanks, J

    C# question

  • Convert "Yes" To Boolean
    S StyleGuide

    Ok Thanks

    C#

  • Convert "Yes" To Boolean
    S StyleGuide

    One more thing.. bool boo = Convert.ToBoolean("True"); boo returns as True. If my Culture was "fr-FR", and : bool boo = Convert.ToBoolean("Vrai"); would boo return as True/Vrai? Thanks J

    C#

  • Convert "Yes" To Boolean
    S StyleGuide

    Thanks Pete

    C#
  • Login

  • Don't have an account? Register

  • Login or register to search.
  • First post
    Last post
0
  • Categories
  • Recent
  • Tags
  • Popular
  • World
  • Users
  • Groups