@honey-the-codewitch I agree with you assesment. I've always thought EF was over-engineeered. I have considered rolling my own, and I know I could do it, but there's so many shops using EF that you're really forced to learn & use it.
Kevin Marois
Posts
-
Taking A Poll: Entity Framework vs Others -
Taking A Poll: Entity Framework vs OthersI'm curious what percentage of you use EF vs some other ORM and why?
Also, how many "roll your own"?
-
C# WPF ComboBox AutoComplete -
"Refresh" BehaviorThanks!
In theory, theory and practice are the same. But in practice, they never are.” If it's not broken, fix it until it is. Everything makes sense in someone's mind.
-
RenderTransform Compilation ErrorI have a SpinningIndicator in a USERCONTROL. It works fine with no problems. Now, I want to move it to a CUSTOMCONTROL. But it fails to compile on this line:
DoubleAnimation Storyboard.TargetProperty="RenderTransform.Angle"
The error message is
Cannot resolve all property references in the property path 'RenderTransform.Angle'. Verify that applicable objects support the properties.
Here's my XAML
<Setter Property="Template"> <Setter.Value> <ControlTemplate TargetType="{x:Type ctrl:SpinningIndicator}"> <Border Background="{Binding Background, RelativeSource={RelativeSource TemplatedParent}}" BorderBrush="{Binding BorderBrush, RelativeSource={RelativeSource TemplatedParent}}" BorderThickness="{Binding BorderThickness, RelativeSource={RelativeSource TemplatedParent}}" Margin="{Binding Margin, RelativeSource={RelativeSource TemplatedParent}}" Padding="{Binding Padding, RelativeSource={RelativeSource TemplatedParent}}"> <Grid> <Grid.RowDefinitions> <RowDefinition Height="\*"/> </Grid.RowDefinitions> <Canvas Grid.Row="0" Name="Canvas1" RenderTransformOrigin="0.5,0.5" HorizontalAlignment="Center" VerticalAlignment="Center" Width="120" Height="120"> <Canvas.RenderTransform> <RotateTransform Angle="0" /> </Canvas.RenderTransform> <Canvas.Style> <Style TargetType="Canvas"> <Style.Triggers> <Trigger Property="IsVisible" Value="True"> </x-turndown>
-
Choosing The Right UPSThanks
In theory, theory and practice are the same. But in practice, they never are.” If it's not broken, fix it until it is. Everything makes sense in someone's mind.
-
Choosing The Right UPSMy UPS went out and I need to get another on. There are so many different flavors. I'm not really sure what I need. What I'm really looking for is something to kick in & keep me powered if the power goes out. I'm looking on Amazon and I see many different ones with XXX Amps & xxx Volts. Some say 'Surge & Battery', and some say just 'Surge'. Some are a mix of both. Some have a 'data line' option. What's the basic idea? What do I really need?
In theory, theory and practice are the same. But in practice, they never are.” If it's not broken, fix it until it is. Everything makes sense in someone's mind.
-
"Refresh" BehaviorI've got some localization code like this:
The behavior calls a static service which looks up the translation. It works fine on first load when the OnValueChanged fires. But, when the user changes the selected language is there some way to get the behavior to 'refresh', or re-evaluate? Thanks
In theory, theory and practice are the same. But in practice, they never are.” If it's not broken, fix it until it is. Everything makes sense in someone's mind.
-
Add Handler For Child Control EventThis is a bit long, but it should be easy to understand... I created a simple navigation CustomControl, with Today, Previous, and Next buttons. It has a routed event called NavigationSelectedEvent. The event is called from the three button's comands: Style
<Setter Property="Template"> <Setter.Value> <ControlTemplate TargetType="{x:Type views:NavigationView}"> <Border x:Name="border" Background="{StaticResource brushActiveBack}" BorderBrush="{StaticResource brushPeriodBorder}" BorderThickness="1,1,0,0" Margin="{Binding Margin, RelativeSource={RelativeSource TemplatedParent}}" Padding="{Binding Padding, RelativeSource={RelativeSource TemplatedParent}}"> <Grid> <Grid.ColumnDefinitions> <ColumnDefinition Width="Auto"/> <ColumnDefinition Width="Auto"/> <ColumnDefinition Width="Auto"/> </Grid.ColumnDefinitions> <Button Grid.Column="0" Content="Today" Height="28" Width="85" Margin="2,2,2,2" Command="{Binding NavigateTodayCommand, RelativeSource={RelativeSource TemplatedParent}}"/> <Button Grid.Column="1" Content="<" Height="28" Width="85" Margin="0,2,2,2" Command="{Binding NavigatePreviousCommand, RelativeSource={RelativeSource TemplatedParent}}"/> <Button Grid.Column="2" Content=">" Height="28" Width="85" Margin="0,2,2,2" Command="{Binding NavigateNextCommand, RelativeSource={RelativeSource TemplatedParent}}"/> </Grid> </Border> </ControlTemplat</x-turndown>
-
Custom Control Based On Combobox - Replace Part Of The ComboboxI do WPF for a living. I have the Control Development book. In the part about creating custom controls, ALL the xaml from the template is used in the examples. I want to create subclass of a combox box. I don't need the XAML for the button or the textbox, or any other part except for the content site. If you go look at the XAML in the link I provided, I want to replace this:
Something like this
public class MyComboBox : ComboBox
{
static MyComboBox()
{
DefaultStyleKeyProperty.OverrideMetadata(typeof(MyComboBox),
new FrameworkPropertyMetadata(typeof(MyComboBox)));
}// Add DP's \* logic here
}
and
<Setter Property="Template"> <Setter.Value> <ControlTemplate TargetType="ComboBox"> </ControlTemplate> </Setter.Value> </Setter>
If I do this XAML, the ENTIRE template is replaced, so I'd have to recreate the textbox, button, etc. What I'm asking is, instead of replacing the ENTIRE TEMPLATE, can I somehow replace just a small piece of that template?
In theory, theory and practice are the same. But in practice, they never are.” If it's not broken, fix it until it is. Everything makes sense in someone's mind.
-
Custom Control Based On Combobox - Replace Part Of The ComboboxI'm looking at the deault combobox style[^] I'm not entirely sure how to ask what I'm thinking, so please bear with me... Is it possible to replace a part of the control? For example, if I wanted to create a custome combobox. I know in the C# file I just subclass it
public class MyComboBox : ComboBox
{
static MyComboBox()
{
DefaultStyleKeyProperty.OverrideMetadata(typeof(MyComboBox),
new FrameworkPropertyMetadata(typeof(MyComboBox)));
}// Add some DP's and logic
}
But in the Generic.xaml, I seems like I would need to have ALL the default xaml from the site above - so that it looks & functions like a combobox. Is there a way for me to provide just a new ContentSite? Can I justy define that in my Generic.xaml and somehow apply that to my combobox? Ot do I need to copy in all the default XAML? Thanks
In theory, theory and practice are the same. But in practice, they never are.” If it's not broken, fix it until it is. Everything makes sense in someone's mind.
-
Where To Find This DLLI'm trying the C# example here: [Changing the Bluetooth Radio Mode | Microsoft Learn](https://learn.microsoft.com/en-us/previous-versions/bb416244(v=msdn.10)?redirectedfrom=MSDN#sample-code) It's referencing BthUtil.dll. I can't find this DLL anywhere. How can I find this? Thanks
In theory, theory and practice are the same. But in practice, they never are.” If it's not broken, fix it until it is. Everything makes sense in someone's mind.
-
VS GitThat created a new repo ib Git, but nothing appears local. The remote has no files in it either. [UPDATE] You have to set the Local Repository path. It sets it My Docs, which created an empty repo there. Once I changed it to my app's directory, it worked fine. Thanks
In theory, theory and practice are the same. But in practice, they never are.” If it's not broken, fix it until it is. Everything makes sense in someone's mind.
-
VS GitI'm not sure if this is by design, or a bug. I created a new WPF project & solution. I added 4 previously existing projects, which all have their own repos, to the solution. I then added a couple of new class library projects to the soltion. When I open the Git window, it shows the 4 previously existsing repos, but there is no repo for my new app. How do I add my new solution, WPF project, and class library projects to Git using VS? If I remove the 4 pre-exising projects, and close & reopen the solution, then there is an menu option to create a repo for it. But then I have broken refs and have to fix those & commit. This can't be right. What am I doing wrong here?
In theory, theory and practice are the same. But in practice, they never are.” If it's not broken, fix it until it is. Everything makes sense in someone's mind.
-
WrapPanel / ItemsControl ProblemI removed the ItemsPanel, and there are no binding errors, yet I still see nothing. Also, I just created a quick test app doing the same thing, and it works: [GitHub - MaroisConsulting/Marois.WrapPanelDemo](https://github.com/MaroisConsulting/Marois.WrapPanelDemo.git)
In theory, theory and practice are the same. But in practice, they never are.” If it's not broken, fix it until it is. Everything makes sense in someone's mind.
-
WrapPanel / ItemsControl ProblemI'm trying to use a WrapPanel inside an ItemsControl. I'm following this[^]. The difference is that mine is bound to a list of objects called Backups. Here's what I have. When I run it, I don't see any of the data.
<Border Grid.Row="1"
CornerRadius="20"
Margin="35"
Padding="10"
Background="Tan"
BorderThickness="3"
BorderBrush="SteelBlue"><ScrollViewer VerticalScrollBarVisibility="Auto" Background="Teal" Margin="10"> <ItemsControl ItemsSource="{Binding Backups}"> <ItemsControl.ItemTemplate> <DataTemplate> <Border Background="Salmon" BorderBrush="Blue" BorderThickness="3"> <StackPanel Orientation="Vertical"> <Rectangle Margin="5" Width="100" Height="100" Fill="Yellow" HorizontalAlignment="Center"/> <TextBlock Text="THIS IS A TEST" HorizontalAlignment="Center" Margin="5"/> </StackPanel> </Border> </DataTemplate> </ItemsControl.ItemTemplate> <ItemsControl.ItemsPanel> <ItemsPanelTemplate> <WrapPanel IsItemsHost="True"/> </ItemsPanelTemplate> </ItemsControl.ItemsPanel> </ItemsControl> </ScrollViewer>
</Border>
In theory, theory and practice are the same. But in practice, they never are.” If it's not broken, fix it until it is. Everything makes sense in someone's mind.
-
Windows Remote Desktop Connection AlternativeThanks!
In theory, theory and practice are the same. But in practice, they never are.” If it's not broken, fix it until it is. Everything makes sense in someone's mind.
-
Windows Remote Desktop Connection AlternativeNot talking about Users or Sessions. Copy & Paste text INSIDE RDC not working
In theory, theory and practice are the same. But in practice, they never are.” If it's not broken, fix it until it is. Everything makes sense in someone's mind.
-
Windows Remote Desktop Connection AlternativeI'm taking about copy & paste INSIDE RDC. Not from Host to Remote
In theory, theory and practice are the same. But in practice, they never are.” If it's not broken, fix it until it is. Everything makes sense in someone's mind.
-
Windows Remote Desktop Connection AlternativeWhile I appreciate you taking the time to reply, I'm not sure it answered my post. When I'm in RDS, Copy & Paste doesn't work (Inside RDC, not Host to Remote. Copy text, past, nothing!), and the whole experience is reallllly slow. I've tried multiple 'fixes' over & over, with no luck. so I'm looking for an alternative.
In theory, theory and practice are the same. But in practice, they never are.” If it's not broken, fix it until it is. Everything makes sense in someone's mind.