OK, this is more note to myself, but I think you might find it useful as well. I was trying to install Windows 7 on my laptop which does not have DVD drive so I had to do it from flash drive.

You need 4 Gig flash drive for this, which is what I’ve used.

Here are step by step instructions:

  1. Insert USB Flash Drive
  2. Insert Windows install DVD
  3. Run Command prompt
  4. Type:
    diskpart

  5. Type:
    list disk

  6. Note the disk number of your USB Flash Drive from the list that comes out. In my case it was disk 2
  7. Type:
    select disk 2

    (note that you need to replace disk 2 with the number of your flash disk)

  8. Run following commands (please make sure you have selected right disk since this will format it):
    clean
    create partition primary
    select partition 1
    active
    format fs=fat32
    assign
    exit
  9. Now copy content of your Windows DVD disk to Flash Drive. Type:
    xcopy e:*.* /s/e/f g:

    (note that you must replace e: with the drive letter of your DVD drive and g: with drive letter of your USB Flash Drive)

  10. That’s it. You can now use your USB Flash Drive to install Windows on new machine.

Hope this helps.

 

Minor bump in version for DotNetBar for WPF in which we added support for custom styling on Appointment Views. There are two good Knowledge Base articles to get you started with that:

  1. How to set custom Style for Appointment Views
  2. How to Assign Context Menu to Appointment View

Now it is really easy to assign custom styles per Appointment View. We are working on some cool stuff so stay tuned.

 

New control being added to upcoming DotNetBar for Windows Forms 7.9 is IP Address Input control. It allows you to enter the IP address value in structured manner and it also supports the null values so you can safely bind it to database fields.

That’s all nice and useful, but we wanted to add more goodness to it, so we introduced a new twist with the free-text value entry. Where the default input mode is structured field mode, you can also switch the control to the free text entry mode using the  button.

When free-text entry button is clicked the field inputs get replaced with the text-box input which accepts anything user types in. Why is this useful? Now you can accept values that are not in default structured format for the control. For example, we provide default implementation where the value entered is resolved as host or domain name into the IP address automatically.

So if you switch the control to free-text entry mode and type devcomponents.com, that value will be converted into the IP address of our web site. This is how that looks like while input is in progress:

Once Enter key is pressed or control loses input focus the value is resolved to IP address. You can turn this off by setting AutoResolveFreeTextEntries property to false.

Usage of this feature is completely optional. ButtonFreeText property is there so you can hide/show free text button, change its image etc. Using FreeTextEntryMode property you can toggle the free-text entry mode from code. You can also set AutoOffFreeTextEntry property to false to turn-off free-text entry automatically when input field loses focus.

But, that is not all. We also provide a way for you to parse entered free-text values into the value control expects. You do so by handling the ConvertFreeTextEntry event. Here is sample code which converts the string “custom” to an IP address:

private void ipAddressInput1_ConvertFreeTextEntry(object sender, DevComponents.Editors.FreeTextEntryConversionEventArgs e)
{
    if (e.ValueEntered.ToLower()=="custom")
    {
        e.ControlValue="255.255.1.1";
        e.IsValueConverted = true;
    }
}

This input control supports all the stuff that our other input controls support, custom popups so you can drop-down any Windows Forms control, custom popup menu items, custom buttons, watermarking, focus highlighting and more.

 

I often get questions about WPF binding behaving differently than people expect in their usage case so here is post to help out with that.

When you bind to properties in WPF with for example: Value=”{Binding Path=MyProperty}” the binding update behavior, i.e the trigger for value update, is controlled by the defaults set on the Dependency Property. For example on our WPF Input controls here is how the Value property is declared:

public static readonly DependencyProperty ValueProperty = DependencyProperty.Register(“Value”, typeof(int?), typeof(IntegerInput), new FrameworkPropertyMetadata(null, FrameworkPropertyMetadataOptions.Journal | FrameworkPropertyMetadataOptions.BindsTwoWayByDefault, null, null, true, UpdateSourceTrigger.LostFocus));

Notice the UpdateSourceTrigger.LostFocus that specifies the update is performed when the input control has lost focus. This is also default behavior for system text box Text property.

To change that you simply specify the UpdateSourceTrigger in your binding declaration as follows:

Value="{Binding Path=MyProperty, UpdateSourceTrigger=PropertyChanged}"

This will update the bound property whenever property value changes.

The UpdateSourceTrigger enumeration has following values you can use:

  • Default – The default UpdateSourceTrigger value of the binding target property. The default value for most dependency properties is PropertyChanged, while the Text property has a default value of LostFocus.
  • PropertyChanged – Updates the binding source immediately whenever the binding target property changes.
  • LostFocus – Updates the binding source whenever the binding target element loses focus.
  • Explicit – Updates the binding source only when you call the UpdateSource method.

Hope this helps.

 

Lot of times (at least for me) the Visual Studio.NET 2008 Toolbox does not get updated when I install new controls. Happens with our controls and any other controls as well. If the installer for the control registers the controls in Visual Studio toolbox here is something you can try so they show up. What you need to do is delete temp/cached files for VS.NET 2008 toolbox so toolbox gets refreshed.

Here is what to do:

  1. Exit all instances Visual Studio
  2. Navigate to your user profile directory for Visual Studio (this is found at %USERPROFILE%\AppData\Local\Microsoft\VisualStudio\9.0). Note that you can paste that into the Explorer at least on Vista and it will navigate to proper folder.
  3. Delete all files with TBD extension found there (they are often hidden files)
  4. Re-start Visual Studio and open your application – the toolbox should be automatically rebuilt (which can take a while depending on your machine’s performance). You should now be able to see newly added control and drag/drop controls onto the design surface.

Hope this helps…

 

Looking for something?

Use the form below to search the site:

Still not finding what you're looking for? Drop a comment on a post or contact us so we can take care of it!

Visit our friends!

A few highly recommended friends...

© 2009 Denis Basaric: DevComponents Blog