That one is entirely up to you. :)
David Veeneman www.veeneman.com
That one is entirely up to you. :)
David Veeneman www.veeneman.com
Well, it's written by God, so it has to be true, right? :laugh:
David Veeneman www.veeneman.com
A move to management may be inevitable. Slashdot has a story in today's edition[^] about ageism in development, so your choices may be to either move into management or move out. And the grayer you get, the tougher it is to find a development position. As to how it's seen on your resume, I suspect it would not be viewed positively. Those who evaluate CVs tend to be managers, and I think they would by and large not look favorably on one who was given an opportunity to move into management, then moved back to development. There must be exceptions, but I think it would make future job searches tougher. So, all in all, you may be better off where you are.
David Veeneman www.veeneman.com
Lost 60 pounds and have kept it off doing simple calorie counting, using an equally simple Excel spreadsheet. Changed my exercise and diet--I now jog 5 miles a day and eat pretty much no red meat, although I really enjoy a Big Mac once a month. Magic formula for me is to keep net calories down to about 1000/day, which equates to 1700 gross calories, with about 700 burned jogging.
David Veeneman www.veeneman.com
Won't sign--it's all very old technology, a government boondoggle. If you want to explore space, kill NASA. It has degenerated into an entrenched government bureaucracy that has rusted and siezed up. When there is an economic reason for space travel, it will develop as quickly as the Internet. Until then, it is a waste of money.
David Veeneman www.veeneman.com
Yeah--I like the software, when it works, and I've gotten seriously aggravated with Acrobat.
David Veeneman www.veeneman.com
I had a bad experience installing Foxit Phantom, Foxit's alternative to Acrobat. The PDF print driver gave me permission exceptions, even on my Administrator account. Foxit has apparently outsourced technical support on the cheap--it was like a very bad comedy. Apparently, they don't know a thing about the program, other than the scripts they have been given. It was capped by a link to a new version of the program that supposedly addressed the problem--and the link didn't work. I asked for a working link and was told to run the existing version as an administrator. After four days of this nonsense, I finally got a working link to an installer with a working print driver. The whole operation seems rather amateur, and I would recommend staying away from them.
David Veeneman www.veeneman.com
According to the Windows 7 Registry (HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows NT\CurrentVersion), the release version of Windows 7 is actually Version 6.1
David Veeneman www.veeneman.com
I run 4.5 mi. every day. I eat smart--a Big Mac a month, and a milkshake a month, but other than that, very little red meat. Lots of fish and veggies. Depressing? Far from it. Once I got used to it, I found that I actually prefer it. I skipped the Big Mac last month. Oh yes--the payoff: I lost fifty pounds in six months (please, no Brit jokes about doing that in a night of cards), and I'm in my best shape in thirty years. I hike the Grand Canyon rim-to-rim twice a year. And I feel great. Not bad for pushing sixty.
David Veeneman www.veeneman.com
I wouldn't recommend any of the other solutions that have been suggested. You will have kids running screaming into the night, figuratively speaking. I have taught kids to program, with a lot of success. Start with something simple and free that is graphically oriented. Kids love making stuff happen on the screen. Currently, I'd suggest Microsoft Small Basic, which is designed as a first programming experience for kids. Adults like it, too, and it's free. If that goes well, then Lego Mindstorms is a good next step, at a cost of a couple of hundred bucks. Don't start a kid on it, though. Until they have some idea of what the programming 'game' is all about, it can be very daunting. Hope that helps!
David Veeneman www.veeneman.com
I'm planning on replacing my development machine when Win 7 comes out. I'm now running a Shuttle G6, but Shuttle's quality has really slid in the past several years, and I'm looking to make a change. I'm running a dual monitor setup, and I'd like to find a compact, desktop model, rather than a tower--something the size of a Shuttle or smaller, that will run two monitors. Several manufacturers offer 'slimline' models that are designed to sit on the end of a desk or workstation. That's what I'm looking for. so, what would you suggest as a good machine that fits that form factor and isn't particularly expensive? Thanks!
David Veeneman www.veeneman.com
Here's how I explain it: Does management care what their work facilities look like? Some do, and some don't. An employer who goes for bare utility in an office or shop will probably do fine with a battleship gray WinForms App. But a lot of employers want to provide a relatively nice working space for their employees-- and a few want to provide a great one. They offer various rationales for doing so--productivity, morale, and so on. If an employer does invest in workspace quality, then their efforts can be undone by an incongruous online workspace--a battleship gray app looks cheap and cheesy in that environment, and that undermines the message management tries to communicate to their employees in their workspace design. WPF lets me (or a designer) tailor the UI of an app to match a client's overall workspace philosophy. If they want battleship gray, I can give it to them. But if they want something nicer, then I can give that to them, also. UI look and feel can be particularly important with younger workers. They grew up on the web, and by and large, they know what good UI design looks like. If they conclude that an app is cheap or cheesy, it will certainly affect how they work with it. It's kind of like putting a hand-painted sign on your front door.
David Veeneman www.veeneman.com
I found my answer and wrote it up as a Code Project article. Hopefully, it will help other people down the road.
David Veeneman www.veeneman.com
How do I get the target for a WPF hyperlink in XAML? I have a listbox that contains hyperlinks. The listbox is bound to a ViewModel.MyHyperlinks collection. ViewModel also has several ICommands exposed as properties. When I click on a hyperlink, it should invoke one of these ICommands. I want to specify which ICommand in a property of the MyHyperlink class. I tried creating a resource to hold the name of the ICommand, but that isn't working. So, my question is: How do I specify an I Command to run in a hyperlink I am loading from an object or a data record? I have created a simple demo project that shows the problem I am having. It can be downloaded here[^] Thanks for your help!
David Veeneman www.veeneman.com
Found my answer. A derived control that wants to implement a Command property must implement the ICommandSource interface. There is an MSDN article[^] that shows how to do it, as well as a code sample[^].
David Veeneman Foresight Systems
How do I go about adding a 'Command' property to a custom WPF control derived from an existing control? I want to use the Command property the same way you would use a Command property on a button--to bind to any ICommand or routed command. I rely heavily on MVVM, and my UI controls are almost always bound to ICommand objects in my view model. I have started using the Actipro Wizard control for my WPF wizards, and it's very good. But it's missing one thing: It won't let you bind a command to the activation of a wizard page. In many wizards, a process should start automatically when a wizard page is activated. For example, in a file copy wizard, pages 1 and 2 get file paths from the user, and when the user advances to page 3, the copy should begin automatically, displaying a progress bar for the operation. Unfortunately, the Actipro WizardPage doesn't have a Command property that fires a command when the page is activated. It does have a 'Selected' event, which I'm using now. But I would rather bind to a command in XAML, so I am extending the ActiPro WizardPage control to add a 'Command' property that will fire when the page is activated. Can anyone point me to any articles or blogs on how to implement a 'Command' property and give the derived control the CanExecute() behavior expected of a command-bound control? Thanks. David Veeneman Foresight Systems
Brilliant! Works like a champ. Thanks for your help on this. I cleaned up the code just a bit--complete code and XAML is posted below. XAML:
<Window x:Class="WpfApplication1.Window1"
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
Title="Window1" Height="300" Width="300">
<StackPanel>
<TextBox Text="{Binding ElementName=playlists, Path=SelectedItem.Name, Mode=TwoWay, UpdateSourceTrigger=PropertyChanged}" />
<ListBox Name="playlists" ItemsSource="{Binding Path=Files}" SelectionMode="Single">
<ListBox.ItemTemplate>
<DataTemplate>
<TextBlock Text="{Binding Name}"/>
</DataTemplate>
</ListBox.ItemTemplate>
</ListBox>
<Button Content="Show file list from DC" Click="Button_Click" />
</StackPanel>
</Window>
Code:
using System.Windows;
using System.Collections.ObjectModel;
using System.Text;
namespace WpfApplication1
{
public partial class Window1 : Window
{
private PlayList _playlist = new PlayList();
public Window1()
{
InitializeComponent();
playlists.DataContext = _playlist;
}
private void Button\_Click(object sender, RoutedEventArgs e)
{
StringBuilder sb = new StringBuilder();
foreach (MyFile file in \_playlist.Files)
{
sb.Append(file.Name + " ");
}
MessageBox.Show(sb.ToString());
}
}
public class MyFile
{
public string Name { get; set; }
}
public class PlayList
{
public ObservableCollection<MyFile> Files { get; set; }
public PlayList()
{
Files = new ObservableCollection<MyFile>();
Files.Add(new MyFile { Name = "a" });
Files.Add(new MyFile { Name = "b" });
Files.Add(new MyFile { Name = "c" });
Files.Add(new MyFile { Name = "d" });
}
}
}
David Veeneman www.veeneman.com
Post deleted because it's wrong. ABitSmart came up with the solution. David Veeneman Foresight Systems
David Veeneman www.veeneman.com
modified on Wednesday, March 25, 2009 11:22 AM
Thanks, but I pasted your code and markup into a WPF project, and I still have the same problem. I have pasted my complete code and markup below. What I want to do is implement two-way binding between the listbox and the textbox; i.e., click on a listbox item and have it appear in the textbox. Then, edit the item in the textbox and have the changes propogated back to the list box. If the listbox ItemsSource property is bound to a DataContext, two-way databinding between the listbox and the textbox doesn't work--it's only one way, from the listbox to the textbox. To see what I mean, remove the ItemsSource binding from the listbox, then add the four PlayList strings to the listbox using the Designer's Items property. Change the textbox binding path to SelectedValue.Content, and run. You will have two-way binding between the textbox and the listbox. Edit the textbox, and the changes appear in the listbox. Now, restore the original code. The textbox-listbox binding is now only one-way--from the listbox to the textbox. Changes in the textbox are not propagated back to the listbox. That brings me back to my original question: Is there any way to implement two-way binding between the textbox and the listbox, while maintaining the listbox ItemsSource binding to the PlayList object? My markup:
<Window x:Class="WpfApplication1.Window1"
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
Title="Window1" Height="300" Width="300">
<StackPanel>
<TextBox Text="{Binding ElementName=playlists, Path=SelectedValue.Content, Mode=TwoWay, UpdateSourceTrigger=PropertyChanged}" />
<ListBox Name="playlists" SelectionMode="Single">
<ListBoxItem>a</ListBoxItem>
<ListBoxItem>b</ListBoxItem>
<ListBoxItem>c</ListBoxItem>
<ListBoxItem>d</ListBoxItem>
</ListBox>
<!-- ItemsSource="{Binding Path=Files}" -->
</StackPanel>
</Window>
My code:
using System.Windows;
using System.Collections.ObjectModel;
namespace WpfApplication1
{
public partial class Window1 : Window
{
private PlayList _playlist = new PlayList();
public Window1()
{
InitializeComponent();
playlists.DataContext = _playlist;
}
}
public class PlayList
{
public Observable