|
zephaneas wrote: no real documentation that I can see. Assuming it is documented somewhere on MSDN, you have to search quite hard to find it. You could always try the Microsoft developer forum and ask there.
|
|
|
|
|
I upgraded a VS 2010 start page to 2010. At the top are 3 objects:
"New Project..."
"Open A Project..."
"Connect To Team Foundation Server"
In VS2010 these are ImageButtons. In VS2012 I can't figure out what they are. So I changed the buttons from:
<vs:ImageButton
x:Uid="ConnectToTSButton"
Margin="15,2,15,2"
Width="Auto"
Content="Connect To Team Foundation Server"
Style="{StaticResource linkStyle}"
Visibility="{Binding Path=TeamFoundationClientSupported, Converter={StaticResource boolToVisibilityConverter}}"
Command="{x:Static sp:VSCommands.ExecuteCommand}" CommandParameter="Team.ConnecttoTeamFoundationServer" ImageNormal="pack://application:,,,/Microsoft.VisualStudio.Shell.StartPage;component/Images/StartPage/ConnectToTFS.png" ImageHover="pack://application:,,,/Microsoft.VisualStudio.Shell.StartPage;component/Images/StartPage/ConnectToTFSMouseOver.png" ImagePressed="pack://application:,,,/Microsoft.VisualStudio.Shell.StartPage;component/Images/StartPage/ConnectToTFSMouseDown.png">
</vs:ImageButton>
to hyperlinks:
<TextBlock Grid.Row="0"
Margin="10,2,15,2">
<Hyperlink Command="{x:Static sp:VSCommands.ExecuteCommand}"
CommandParameter="Team.ConnecttoTeamFoundationServer">
<TextBlock Text="Connect To Team Foundation Server"
FontSize="14"
Foreground="{StaticResource linkColor}"/>
</Hyperlink>
</TextBlock>
But the links are never enabled. I dropped in a button and wire it to the command, and it also is disabled. So the question is, what makes this command enabled?
If it's not broken, fix it until it is
|
|
|
|
|
You are trying to edit Visual Studio's start page?
I don't find any solid reason why to do so... Secondly, if you need help, please see the XMLNS for vs and look for what is provided there to make these buttons run. I would like to say, don't do it. Let it be the actual page.
The sh*t I complain about
It's like there ain't a cloud in the sky and it's raining out - Eminem
~! Firewall !~
|
|
|
|
|
Afzaal Ahmad Zeeshan wrote: I don't find any solid reason why to do so
I didn't ask you if you found a reason to do so.
Let me educate you a bit since you clearly don't know... Starting in VS 2010 MS introduced Start Page templates so developers could create their own start pages. It's a WPF user control and is easy to modify. But they did not provide templates for later versions of VS, so you have to use the 2010 template, which can be difficult.
Please, if you don't have a solution to the problem, don't responde.
If it's not broken, fix it until it is
|
|
|
|
|
I have to display a PDF file in a WPF form. What are the possible ways other than using adobe library.
|
|
|
|
|
Convert to XPS and use a DocumentViewer.
|
|
|
|
|
Thanks for the answer..
Could you please suggest any free libraries to convert PDF to XPS.
|
|
|
|
|
The easiest way to "convert" a PDF to XPS is to "print" the PDF; where one selects the "Microsoft XPS Document Writer" as the printer / driver.
The XPS printer driver is freely available, as are PDF readers / printers (e.g. Foxit).
|
|
|
|
|
Hi folks,
for some weeks now, I'm getting my head around an interesting problem: I'd like to display a text file of several gigs, and let it be editable.
Now - how would you do that? All standard approaches fail, because they rely on the file being fully loaded into RAM, which is impossible with several gigabytes of data. So, I thought I'll create a CustomControl. Basically, I've derived a Control from the Control class, which embeds a FrameworkElement in it's Generic.xaml. This FrameworkElement has a VisualCollection. Now, I hand over a Stream to this control. The Stream must be seekable and writable, otherwise you will encounter an exception. So far, I do the following: I read a chunk of data from the Stream, draw that using FormattedText on a DrawingContext, retrieved by a DrawingVisual. For scrolling, I simply adjust the offset of the FormattedText-function. To achieve seamless scrolling (which is needed, so you can scroll from one buffer chunk to the next without a visible gap), I have a function which calculates the amount of text that fits precisely into a rectangle (e.g. the Window's viewport), so that the rest of the current buffer, together with the next buffer, can be printed on the next rectangle.
But, for the sake of it, I can't find out how I would do standard editing functionality. Because, for the scrollbar and this "chunking" to work, one needs to precompute the needed amount of text to fill the rectangle, which changes when editing the text.
tl;dr:
Do you have a smart concept on hand, together with WPF and C#, to create a TextEditor, which is capable of editing gigabytes of text?
|
|
|
|
|
I'm curious, is there any text editor that will handle gb of data?
Never underestimate the power of human stupidity
RAH
|
|
|
|
|
Not really, at least for Windows. On the one hand, there is Large Text File Viewer, but that is hard to find at the moment. EmEditor is commercial Software, but disables word wrapping and some other options, afaik. And I don't think editing will work.
Then, there is HxD, a Hexeditor. It can even read your disk. That would be the last option, cause with a hex editor, you dont have to deal with line breaks etc. Everything can be set to fixed with. But that would be too easy.^^
A little bit easier to approach would be paging, I guess, instead of scrolling. But that is not so nice, but would be an Option, too.
|
|
|
|
|
Personally I would go for chaptering or chunking the physical data on the drive, split it up into edible volumes, store it and when print, ghu forbid, put it back together.
What sort of data is it that is gb big and requires editing? In a text editor!
Never underestimate the power of human stupidity
RAH
|
|
|
|
|
Hi,
thanks for your thoughts on that.
When splitting up into edible volumes, how would you handle selections across the volumes?
To put things straight - it's not about solving an actual problem. Some time ago, I worked with databases. There is nothing more frustrating than dumping a large MySQL database, just to realize after some hours, that the "CREATE TABLE" statement has been added to the export. Just as an example I've in my mind now.
But there is no customer request behind that. It's just an idea, stuck in my head for a few months now, which I'd like to solve.
What I've got so far: If you use the text approach, chunking would be the best option. There is no need to split the files on the drive, but you would need some kind of controller which would manage the changes being made, map them to the chunks and save them if necessary. This would require paging for navigation, because scrolling would simply be to difficult if you need to take the window size and linebreaks etc. into account.
If I want scrolling, I should take the Hex-Editor approach, that is: Set the textfield to a fixed amount of characters per line, and don't care for linebreaks, etc.
I'm still open for more ideas, though.
|
|
|
|
|
It might be worth looking at Memory-Mapped files[^], which would allow you to map sections of the file into memory. No idea how well that would fit with your editor, though.
Once you've finished, this sounds like a good topic for an article!
"These people looked deep within my soul and assigned me a number based on the order in which I joined."
- Homer
|
|
|
|
|
Hi Richard,
thanks for your comment. I've heard of MMF, but haven't used it before. Sounds interesting, although that wouldn't solve the scrolling part.
And thanks for the hint in terms of an article. I might consider that, why not.
|
|
|
|
|
For the scrolling, as soon as you have more than a thousand line or so, you won't be able to reach each line by using the scrollbar so making approximations might be enough...
Or you can divide the file into blocks of a few KB and keep some information like the number of lines in that block or the actual size on screen once the information is known. In practice, I think that using approximations and make adjustment as required later could be more than enough.
And you can probably buy already made editor component that works with big files.
Finally, if files are so large, even if technical problems are solved, it would still be hard to use in many scenarios.
Philippe Mori
modified 25-Mar-15 7:53am.
|
|
|
|
|
I guess I go with the approximation approach, that sounds kind of reasonable.
|
|
|
|
|
Hi,
I was hoping someone can point me in the right direction.
I have developed a document reader based around XPS which allows the users to draw an image with the mouse on top of the paginated document in a Canvas. Now this works great in the original orientation (Portrait).
But as soon as I perform a RotateTransform (90 or 270 degrees) on the Canvas for Landscape pages, then attempt to draw again, the image is in the wrong orientation because the left and top of the Canvas has shifted.
Now I can do a RotateTransform on the image before the drawing begins, but on the mousemove event it's going in the opposite direction.
Is there a way to move the left and top of the Canvas to a new position after the RotateTransform?
Thanks
|
|
|
|
|
How to insert data in database using mvvm in WCF
|
|
|
|
|
I'm sorry, but your question is far too broad to be able to answer in a simple forum. Which particular part of this are you having a problem with? WCF? Saving to a database? The principles of MVVM? Some other issue? Remember that we don't know what problem you're actually trying to solve or what your level of knowledge is, so you have to help us by focusing in on the issue you're having a problem with.
|
|
|
|
|
|
Just try to understand MVVM rather than going through some code. Once you can understand MVVM, You will get to know how to do that.
|
|
|
|
|
Hi,
Please picture the below points (WPF-> WCF-> DataBase)
1. MVVM is an architecture design pattern used in WPF
2. WPF application need to consume a WCF service for performing CRUD operations
3. WCF will contain the logic for performing CRUD operations with Database for that you can use NHibernate, Entity Framework or with simple ADO.net etc
|
|
|
|
|
Good Day All
I have two WPF Pages Page 1 and Page 2. i want to change the a Label of Page 2 from Page 1.
tried to create an Instance of Page 2 in Page 1 and access the label and Change the content property before i explore the Property Solution if there is anyone who has a different solution. please help
Thanks
Vuyiswa Maseko,
Spoted in Daniweb-- Sorry to rant. I hate websites. They are just wierd. They don't behave like normal code.
C#/VB.NET/ASP.NET/SQL7/2000/2005/2008
http://www.vuyiswamaseko.com
vuyiswa[at]dotnetfunda.com
http://www.Dotnetfunda.com
|
|
|
|
|
Hello Everyone
I'm struggling to solve the problem with my nested UserControl.
When I run the application the main window opens, inside the main window is a button, when I click that button it calls up a UserControl (called Applic).
Inside the Applic UserControl is another nested UserControl called PasswordScreen.
Within the PasswordScreen there is a button called Login, when I press this button to call another UserControl (called SwitchboardView) it is not firing nothing (here is the sample code)
private void btnLogin_Click(object sender, RoutedEventArgs e)
{
Applic ap = new Applic();
SwitchboardView sbv = new SwitchboardView();
ap.MainGridApplic.Children.Add(sbv);
}
Could someone please help me solve this problem, I have been struggling for a long time to solve this problem but I just can't get it around.
Thanks in advance...
Kind regards
Roni
|
|
|
|
|