I want to set a Custom Style in my Applications,
but when i try the MahApps tutorial from:
http://mahapps.com/guides/styles.html
I get this Error:
"The property Freeze was not found in type 'SolidColorBrush'"
My Question is:
Which CLR must I declare for the Freeze Option ?
The clr for the Freeze Declaration is:
xmlns:options="http://schemas.microsoft.com/winfx/2006/xaml/presentation/options
Related
I have some bindings warning that I can't solve:
System.Windows.Data Information: 10 : Cannot retrieve value using the
binding and no valid fallback value exists; using default instead.
BindingExpression:Path=AddNewObjectCommand; DataItem=null; target
element is 'ButtonWithIcon' (Name='uc'); target property is
'ButtonCommand' (type 'ICommand')
My understanding is that I should use a fallback value. This works with simple object types, however don't know how to handle this for complex objects like lists, or in that case commands.
Here is what I have tried, with no luck:
<controls:ButtonWithIcon ButtonCommand="{Binding CancelCommand, FallbackValue={x:Null}}" />
Would you have any thought on this?
Thank you in advance!
How can I use this code:
VB6.LoadResString(i)
without getting this warning:
Public Function LoadResString(ID As Integer) As String is obsolete:
'Microsoft.VisualBasic.Compatibility.* classes are obsolete and supported
within 32 bit processes only. http://go.microsoft.com/fwlink/?linkid=160862'.
The posted link in the error and other info in the MSDN site only say to me "ehy, this is obsolete in your framework, don't use it", but what if I need it (Loads a string from a resource (.res) file.)?
How can I write it without getting that warning message?
UPDATE: Thanks, but nothing worked...
I followed examples of RaisePropertyChanged for the MVVM Light libraries in a WPF application. This seems like it should be valid. Event the code hints seem to think so. But when I build, Visual Studio gives me an error and then highlights RaisePropertyChanged with light blue squiggleys. Anyone seen this issue? Is there something obvious I'm missing?
Private _selectedServerInstance As String
Property SelectedServerInstance As String
Get
Return _selectedServerInstance
End Get
Set(value As String)
_selectedServerInstance = value
RaisePropertyChanged(Function() Me.SelectedServerInstance) //Error on build
End Set
End Property
' Looks ok until I build. The Error for each line with RaisePropertyChanged using a lambda property selector is:
' error BC30518: Overload resolution failed because no accessible 'RaisePropertyChanged' can be called with these arguments:
for RaisePropertyChanged:
References required to assemblies 'System.Linq.Expressions', 'System.Runtime', 'System.ObjectModel'.
Check References in your project.
System.Runtime and System.ObjectModel are not in the list of references to choose. Is this because they are 'facade' references, and rarely get used except in the crazy case of mvvm-light?
I've been happily writing code like this:
For idtArticles = 0 To dtArticles.Rows.Count - 1
and this:
If request.QueryString.HasKeys() Then
For Each parameter In request.QueryString.AllKeys
requestVars.Add(parameter, request.QueryString(parameter))
Next
Else...
And suddenly it won't compile and giving errors
Error 34 'idtArticles' is not declared. It may be inaccessible due to
its protection level. ..userAccountModel.vb
Which assuming I can't go back to my lazy ways is fine to edit as
For idtArticles as Integer
But I don't know for exampple what the Request collection would be declared as..
Error 39 'Parameter' is a type and cannot be used as an
expression. ..userAccountModel.vb
How can I make it go back to not caring? Also if not, what shall I DIM that Parameter as?
I've checked and Option Strict is OFF. In Tools.. Default Project Settings.
Thanks!
From Microsoft Doc on Option Infer Statement:
When you set Option Infer to On, you can declare local variables
without explicitly stating a data type. The compiler infers the data
type of a variable from the type of its initialization expression.
I would try this at the top of your code file:
Option Infer On
Or, alternatively you can change this on My Project -> Compile - Option Infer, right under Option strict!
I try to build subproject ExplorerPlugin from mDNSResponder-107.6.tar.gz archive but
receive next link error:
uafxcwd.lib(dllmodul.obj) : error LNK2005: _DllMain#12 already defined
how to solve it?
I had exactly the same problem and this fixed it:
https://stackoverflow.com/a/19930430/625227
Enter this code in the .cpp file where your DLLMain function is
extern "C" { int _afxForceUSRDLL; }
Looks like you are using MFC. It already has a DllMain entrypoint, required to initialize MFC properly. Check this KB article for recommended workarounds. Hard to otherwise provide a better answer, you didn't provide a link and it looks to me like this is Apple code, very un-mfc-ish.