Welcome to OStack Knowledge Sharing Community for programmer and developer-Open, Learning and Share
Welcome To Ask or Share your Answers For Others

Categories

0 votes
141 views
in Technique[技术] by (71.8m points)

c# - VisualStudio does not find namespace

Well, I'd like to use a class of a namespace in my Mainwindow.xaml

Image

As you see the namespace called WPF.Tools

Now I create a local at the top to the XAML

xmlns:webutil="WPF.Tools"

And in the Grid I have a WebBrowser where I'd like to use a a method of the class of the namespace:

<WebBrowser webutil:WebBrowserBehaviors.BindableSource="{Binding SelectedRSSFeed.Link}"  Grid.Column="1" Margin="10,10,10,10" Grid.RowSpan="3" Grid.Row="0"/>

If I hover over it it says: The name "WebBrowserBehaviors" does not exist in the namespace "WPF.Tools".

I also added a Project Reference so I don't think this is the Problem

question from:https://stackoverflow.com/questions/65874149/visualstudio-does-not-find-namespace

与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
Welcome To Ask or Share your Answers For Others

1 Answer

0 votes
by (71.8m points)

Your reference seems wrong.

It should be:

xmlns:webutil="clr-namespace:WPF.Tools;assembly=WPF.Tools

与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
Welcome to OStack Knowledge Sharing Community for programmer and developer-Open, Learning and Share
Click Here to Ask a Question

...